From a655557af0249cb9ed15d6321f51533d42896fa6 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Wed, 16 Dec 2015 11:11:34 -0800 Subject: [PATCH] Make variable name more obvious --- assignment-client/src/octree/OctreeServer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/assignment-client/src/octree/OctreeServer.cpp b/assignment-client/src/octree/OctreeServer.cpp index 75252ddf8c..acc9537a56 100644 --- a/assignment-client/src/octree/OctreeServer.cpp +++ b/assignment-client/src/octree/OctreeServer.cpp @@ -1173,7 +1173,8 @@ void OctreeServer::nodeKilled(SharedNodePointer node) { // Shutdown send thread auto it = _sendThreads.find(node->getUUID()); if (it != _sendThreads.end()) { - it->second->setIsShuttingDown(); + auto& sendThread = *it->second; + sendThread.setIsShuttingDown(); } // calling this here since nodeKilled slot in ReceivedPacketProcessor can't be triggered by signals yet!! @@ -1217,8 +1218,9 @@ void OctreeServer::aboutToFinish() { // Shut down all the send threads for (auto it = _sendThreads.begin(); it != _sendThreads.end(); ++it) { - it->second->disconnect(this); // Disconnect so that removeSendThread doesn't get called later - it->second->setIsShuttingDown(); + auto& sendThread = *it->second; + sendThread.disconnect(this); // Disconnect so that removeSendThread doesn't get called later + sendThread.setIsShuttingDown(); } // Wait on all send threads to be done before continuing