From 78c0815c4118fe24ab78cce2dc48a6232dcd824a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 2 Jun 2012 20:55:18 +0000 Subject: - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/JSON/Source/JSONNode_Mutex.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/JSON/Source/JSONNode_Mutex.cpp') diff --git a/plugins/JSON/Source/JSONNode_Mutex.cpp b/plugins/JSON/Source/JSONNode_Mutex.cpp index 0f0dbe5d7b..f047f58403 100644 --- a/plugins/JSON/Source/JSONNode_Mutex.cpp +++ b/plugins/JSON/Source/JSONNode_Mutex.cpp @@ -73,14 +73,14 @@ void JSONNode::lock(int thread){ //make sure that the same thread isn't locking it more than once (possible due to complex ref counting) std::map >::iterator it = threadlocks.find(thread); - if (it == threadlocks.end()){ + if (it == threadlocks.end()) { std::map newthread; newthread[thislock] = 1; threadlocks.insert(std::pair >(thread, newthread)); } else { //this thread already has some things locked, check if the current mutex is std::map & newthread = it -> second; std::map::iterator locker = newthread.find(thislock); - if (locker == newthread.end()){ //current mutex is not locked, set it to locked + if (locker == newthread.end()) { //current mutex is not locked, set it to locked newthread.insert(std::pair(thislock, 1)); } else { //it's already locked, don't relock it ++(locker -> second); @@ -133,7 +133,7 @@ void internalJSONNode::_set_mutex(void * mutex, bool unset){ if (mutex){ #ifdef JSON_MUTEX_MANAGE std::map::iterator it = mutex_manager.find(mutex); - if (it == mutex_manager.end()){ + if (it == mutex_manager.end()) { mutex_manager.insert(std::pair(mutex, 1)); } else { ++it -> second; @@ -168,7 +168,7 @@ void internalJSONNode::_unset_mutex(void){ if (mylock){ mut.push_back(JSON_NEW(JSONNode(JSON_TEXT("this"), (long)mylock))); std::map::iterator it = mutex_manager.find(mylock); - if (it == mutex_manager.end()){ + if (it == mutex_manager.end()) { mut.push_back(JSON_NEW(JSONNode(JSON_TEXT("references"), JSON_TEXT("error")))); } else { mut.push_back(JSON_NEW(JSONNode(JSON_TEXT("references"), it -> second))); -- cgit v1.2.3