History

leverage new libcuckoo hash outside LimitedNodeList

Stephen Birarda committed 12 years ago

Commit 8a72cdd1 parent a492abc16 files · +157 −64Browse files

Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 16 files). Show all

Unified · Split

interface/src/MetavoxelSystem.cpp+11−2
@@ -163,7 +163,12 @@ void MetavoxelSystem::render() { · 162 unmodified lines
163163 }
164164
165165 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+
167172 if (node->getType() == NodeType::MetavoxelServer) {
168173 QMutexLocker locker(&node->getMutex());
169174 MetavoxelSystemClient* client = static_cast<MetavoxelSystemClient*>(node->getLinkedData());
@@ -685,7 +690,11 @@ MetavoxelClient* MetavoxelSystem::createClient(const SharedNodePointer& node) { · 515 unmodified lines
685690 }
686691
687692 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+
689698 if (node->getType() == NodeType::MetavoxelServer) {
690699 QMutexLocker locker(&node->getMutex());
691700 MetavoxelSystemClient* client = static_cast<MetavoxelSystemClient*>(node->getLinkedData());

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t