mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 15:23:05 +02:00
use typedef in NodeList implementation
This commit is contained in:
parent
0579b18426
commit
1faa2120aa
1 changed files with 5 additions and 5 deletions
|
@ -254,24 +254,24 @@ int NodeList::updateNodeWithData(Node *node, const HifiSockAddr& senderSockAddr,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QSharedPointer<Node> NodeList::nodeWithAddress(const HifiSockAddr &senderSockAddr) {
|
SharedNodePointer NodeList::nodeWithAddress(const HifiSockAddr &senderSockAddr) {
|
||||||
// naively returns the first node that has a matching active HifiSockAddr
|
// naively returns the first node that has a matching active HifiSockAddr
|
||||||
// note that there can be multiple nodes that have a matching active socket, so this isn't a good way to uniquely identify
|
// note that there can be multiple nodes that have a matching active socket, so this isn't a good way to uniquely identify
|
||||||
foreach(QSharedPointer<Node> node, _nodeHash) {
|
foreach(SharedNodePointer node, _nodeHash) {
|
||||||
if (node->getActiveSocket() && *node->getActiveSocket() == senderSockAddr) {
|
if (node->getActiveSocket() && *node->getActiveSocket() == senderSockAddr) {
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return QSharedPointer<Node>(NULL);
|
return SharedNodePointer();
|
||||||
}
|
}
|
||||||
|
|
||||||
QSharedPointer<Node> NodeList::nodeWithUUID(const QUuid& nodeUUID) {
|
SharedNodePointer NodeList::nodeWithUUID(const QUuid& nodeUUID) {
|
||||||
QHash<QUuid, QSharedPointer<Node> >::const_iterator foundIterator = _nodeHash.find(nodeUUID);
|
QHash<QUuid, QSharedPointer<Node> >::const_iterator foundIterator = _nodeHash.find(nodeUUID);
|
||||||
if (foundIterator != _nodeHash.end()) {
|
if (foundIterator != _nodeHash.end()) {
|
||||||
return foundIterator.value();
|
return foundIterator.value();
|
||||||
} else {
|
} else {
|
||||||
return QSharedPointer<Node>(NULL);
|
return SharedNodePointer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue