From kde-commits Thu Oct 25 12:15:05 2012 From: Alexander Dymo Date: Thu, 25 Oct 2012 12:15:05 +0000 To: kde-commits Subject: [kdev-ruby] duchain/builders: Simplify code Message-Id: <20121025121505.D9095A60C8 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=135116731412391 Git commit 9184d0b2084726f3a76a029942160a1e10d1c7eb by Alexander Dymo. Committed on 25/10/2012 at 14:14. Pushed by dymo into branch 'master'. Simplify code M +1 -3 duchain/builders/contextbuilder.cpp http://commits.kde.org/kdev-ruby/9184d0b2084726f3a76a029942160a1e10d1c7eb diff --git a/duchain/builders/contextbuilder.cpp b/duchain/builders/context= builder.cpp index 02e0e05..d53b399 100644 --- a/duchain/builders/contextbuilder.cpp +++ b/duchain/builders/contextbuilder.cpp @@ -267,9 +267,8 @@ void ContextBuilder::require(Node *node, bool local) = const IndexedString indexedPath(path); = - DUChainWriteLocker lock(DUChain::lock()); + DUChainWriteLocker lock; ReferencedTopDUContext ctx =3D DUChain::self()->chainForDocument(index= edPath); - lock.unlock(); = if (!ctx) { /* @@ -284,7 +283,6 @@ void ContextBuilder::require(Node *node, bool local) m_priority - 1, 0, ParseJob::FullSequentialProcessing); return; } else { - lock.lock(); currentContext()->addImportedParentContext(ctx); } }