repair crazy references to node ponter from old iterator style

This commit is contained in:
Stephen Birarda 2014-01-14 10:49:46 -08:00
parent 66f50c38e3
commit 9efb391ecf
6 changed files with 8 additions and 8 deletions

View file

@ -272,7 +272,7 @@ void AudioMixer::run() {
foreach(SharedNodePointer node, nodeList->getNodeHash()) {
if (node->getType() == NODE_TYPE_AGENT && node->getActiveSocket() && node->getLinkedData()
&& ((AudioMixerClientData*) node->getLinkedData())->getAvatarAudioRingBuffer()) {
prepareMixForListeningNode(&(*node));
prepareMixForListeningNode(node.data());
memcpy(clientPacket + numBytesPacketHeader, _clientSamples, sizeof(_clientSamples));
nodeList->getNodeSocket().writeDatagram((char*) clientPacket, sizeof(clientPacket),

View file

@ -80,7 +80,7 @@ void broadcastAvatarData() {
if (otherNode->getLinkedData() && otherNode->getUUID() != node->getUUID()) {
unsigned char* avatarDataEndpoint = addNodeToBroadcastPacket((unsigned char*)&avatarDataBuffer[0],
&*otherNode);
otherNode.data());
int avatarDataLength = avatarDataEndpoint - (unsigned char*)&avatarDataBuffer;
if (avatarDataLength + packetLength <= MAX_PACKET_SIZE) {

View file

@ -207,7 +207,7 @@ void DomainServer::readAvailableDatagrams() {
// don't send avatar nodes to other avatars, that will come from avatar mixer
if (nodeType != NODE_TYPE_AGENT || node->getType() != NODE_TYPE_AGENT) {
currentBufferPos = addNodeToBroadcastPacket(currentBufferPos, &(*node));
currentBufferPos = addNodeToBroadcastPacket(currentBufferPos, node.data());
}
}
@ -322,7 +322,7 @@ int DomainServer::civetwebRequestHandler(struct mg_connection *connection) {
if (node->getLinkedData()) {
// add the node using the UUID as the key
QString uuidString = uuidStringWithoutCurlyBraces(node->getUUID());
assignedNodesJSON[uuidString] = jsonObjectForNode(&(*node));
assignedNodesJSON[uuidString] = jsonObjectForNode(node.data());
}
}

View file

@ -263,7 +263,7 @@ void VoxelStatsDialog::showOctreeServersOfType(int& serverCount, NODE_TYPE serve
std::stringstream extraDetails("");
std::stringstream linkDetails("");
if (nodeList->getNodeActiveSocketOrPing(&(*node))) {
if (nodeList->getNodeActiveSocketOrPing(node.data())) {
serverDetails << "active ";
} else {
serverDetails << "inactive ";

View file

@ -45,7 +45,7 @@ bool JurisdictionListener::queueJurisdictionRequest() {
NodeList* nodeList = NodeList::getInstance();
foreach(SharedNodePointer node, nodeList->getNodeHash()) {
if (nodeList->getNodeActiveSocketOrPing(&(*node)) &&
if (nodeList->getNodeActiveSocketOrPing(node.data()) &&
node->getType() == getNodeType()) {
const HifiSockAddr* nodeAddress = node->getActiveSocket();
PacketSender::queuePacketForSending(*nodeAddress, bufferOut, sizeOut);

View file

@ -61,7 +61,7 @@ bool OctreeEditPacketSender::serversExist() const {
foreach(SharedNodePointer node, nodeList->getNodeHash()) {
// only send to the NodeTypes that are getMyNodeType()
if (node->getType() == getMyNodeType()) {
if (nodeList->getNodeActiveSocketOrPing(&(*node))) {
if (nodeList->getNodeActiveSocketOrPing(node.data())) {
QUuid nodeUUID = node->getUUID();
// If we've got Jurisdictions set, then check to see if we know the jurisdiction for this server
if (_serverJurisdictions) {
@ -91,7 +91,7 @@ void OctreeEditPacketSender::queuePacketToNode(const QUuid& nodeUUID, unsigned c
// only send to the NodeTypes that are getMyNodeType()
if (node->getType() == getMyNodeType() &&
((node->getUUID() == nodeUUID) || (nodeUUID.isNull()))) {
if (nodeList->getNodeActiveSocketOrPing(&(*node))) {
if (nodeList->getNodeActiveSocketOrPing(node.data())) {
const HifiSockAddr* nodeAddress = node->getActiveSocket();
queuePacketForSending(*nodeAddress, buffer, length);