Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 16 files). Show all
Unified · Split
| @@ -163,7 +163,12 @@ void MetavoxelSystem::render() { · 162 unmodified lines | ||
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | void MetavoxelSystem::refreshVoxelData() { |
| 166 | − foreach (const SharedNodePointer& node, NodeList::getInstance()->getNodeHash()) { | |
| 166 | + NodeHashSnapshot snapshotHash = NodeList::getInstance()->getNodeHash().snapshot_table(); | |
| 167 | + | |
| 168 | + for (auto it = snapshotHash.begin(); it != snapshotHash.end(); it++) { | |
| 169 | + | |
| 170 | + SharedNodePointer node = it->second; | |
| 171 | + | |
| 167 | 172 | if (node->getType() == NodeType::MetavoxelServer) { |
| 168 | 173 | QMutexLocker locker(&node->getMutex()); |
| 169 | 174 | MetavoxelSystemClient* client = static_cast<MetavoxelSystemClient*>(node->getLinkedData()); |
| @@ -685,7 +690,11 @@ MetavoxelClient* MetavoxelSystem::createClient(const SharedNodePointer& node) { · 515 unmodified lines | ||
| 685 | 690 | } |
| 686 | 691 | |
| 687 | 692 | void MetavoxelSystem::guideToAugmented(MetavoxelVisitor& visitor, bool render) { |
| 688 | − foreach (const SharedNodePointer& node, NodeList::getInstance()->getNodeHash()) { | |
| 693 | + NodeHashSnapshot snapshotHash = NodeList::getInstance()->getNodeHash().snapshot_table(); | |
| 694 | + | |
| 695 | + for (auto it = snapshotHash.begin(); it != snapshotHash.end(); it++) { | |
| 696 | + SharedNodePointer node = it->second; | |
| 697 | + | |
| 689 | 698 | if (node->getType() == NodeType::MetavoxelServer) { |
| 690 | 699 | QMutexLocker locker(&node->getMutex()); |
| 691 | 700 | MetavoxelSystemClient* client = static_cast<MetavoxelSystemClient*>(node->getLinkedData()); |