[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdev-ruby] duchain/builders: Simplify code
From:       Alexander Dymo <adymo () kdevelop ! org>
Date:       2012-10-25 12:15:05
Message-ID: 20121025121505.D9095A60C8 () git ! kde ! org
[Download RAW message or body]

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/contextbuilder.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 = DUChain::self()->chainForDocument(indexedPath);
-    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);
     }
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic