History

use NodeSet in place of QSet<NodeType_t> where possible

Stephen Birarda committed 12 years ago

Commit 423e1591 parent 4de270b4 files · +9 −10Browse files

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

Unified · Split

interface/src/Application.cpp+5−6
@@ -229,7 +229,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 228 unmodified lines
229229 #endif
230230
231231 // tell the NodeList instance who to tell the domain server we care about
232− nodeList->addSetOfNodeTypesToNodeInterestSet(QSet<NodeType_t>() << NodeType::AudioMixer << NodeType::AvatarMixer
232+ nodeList->addSetOfNodeTypesToNodeInterestSet(NodeSet() << NodeType::AudioMixer << NodeType::AvatarMixer
233233 << NodeType::VoxelServer << NodeType::ParticleServer
234234 << NodeType::MetavoxelServer);
235235
@@ -648,8 +648,7 @@ void Application::resetProfile(const QString& username) { · 412 unmodified lines
648648 updateWindowTitle();
649649 }
650650
651−void Application::controlledBroadcastToNodes(const QByteArray& packet,
652− const QSet<NodeType_t>& destinationNodeTypes) {
651+void Application::controlledBroadcastToNodes(const QByteArray& packet, const NodeSet& destinationNodeTypes) {
653652 foreach(NodeType_t type, destinationNodeTypes) {
654653 // Intercept data to voxel server when voxels are disabled
655654 if (type == NodeType::VoxelServer && !Menu::getInstance()->isOptionChecked(MenuOption::Voxels)) {
@@ -657,7 +656,7 @@ void Application::controlledBroadcastToNodes(const QByteArray& packet, · 1 unmodified line
657656 }
658657
659658 // Perform the broadcast for one type
660− int nReceivingNodes = NodeList::getInstance()->broadcastToNodes(packet, QSet<NodeType_t>() << type);
659+ int nReceivingNodes = NodeList::getInstance()->broadcastToNodes(packet, NodeSet() << type);
661660
662661 // Feed number of bytes to corresponding channel of the bandwidth meter, if any (done otherwise)
663662 BandwidthMeter::ChannelIndex channel;
@@ -1332,7 +1331,7 @@ void Application::wheelEvent(QWheelEvent* event) { · 668 unmodified lines
13321331
13331332 void Application::sendPingPackets() {
13341333 QByteArray pingPacket = NodeList::getInstance()->constructPingPacket();
1335− getInstance()->controlledBroadcastToNodes(pingPacket, QSet<NodeType_t>() << NodeType::VoxelServer
1334+ getInstance()->controlledBroadcastToNodes(pingPacket, NodeSet() << NodeType::VoxelServer
13361335 << NodeType::ParticleServer
13371336 << NodeType::AudioMixer << NodeType::AvatarMixer
13381337 << NodeType::MetavoxelServer);
@@ -2363,7 +2362,7 @@ void Application::updateAvatar(float deltaTime) { · 1024 unmodified lines
23632362 QByteArray avatarData = byteArrayWithPopluatedHeader(PacketTypeAvatarData);
23642363 avatarData.append(_myAvatar.toByteArray());
23652364
2366− controlledBroadcastToNodes(avatarData, QSet<NodeType_t>() << NodeType::AvatarMixer);
2365+ controlledBroadcastToNodes(avatarData, NodeSet() << NodeType::AvatarMixer);
23672366
23682367 // Update _viewFrustum with latest camera and view frustum data...
23692368 // NOTE: we get this from the view frustum, to make it simpler, since the

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