History

fix OctreeSceneStat unpacking in Application

Stephen Birarda committed 11 years ago

Commit 9c57d151 parent a9d57231 file · +5 −11Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+5−11
@@ -3596,19 +3596,13 @@ int Application::processOctreeStats(NLPacket& packet, SharedNodePointer sendingN · 3595 unmodified lines
35963596 int statsMessageLength = 0;
35973597
35983598 const QUuid& nodeUUID = sendingNode->getUUID();
3599− OctreeSceneStats* octreeStats;
3600−
3599+
36013600 // now that we know the node ID, let's add these stats to the stats for that node...
36023601 _octreeSceneStatsLock.lockForWrite();
3603− auto it = _octreeServerSceneStats.find(nodeUUID);
3604− if (it != _octreeServerSceneStats.end()) {
3605− octreeStats = &it->second;
3606− statsMessageLength = octreeStats->unpackFromPacket(packet);
3607− } else {
3608− OctreeSceneStats temp;
3609− statsMessageLength = temp.unpackFromPacket(packet);
3610− octreeStats = &temp;
3611− }
3602+
3603+ OctreeSceneStats* octreeStats = &_octreeServerSceneStats[nodeUUID];
3604+ statsMessageLength = octreeStats->unpackFromPacket(packet);
3605+
36123606 _octreeSceneStatsLock.unlock();
36133607
36143608 VoxelPositionSize rootDetails;