mirror of
https://github.com/overte-org/overte.git
synced 2025-06-24 01:39:46 +02:00
changed writelock to readlock
plus a coding standard fix
This commit is contained in:
parent
ff2a5342ee
commit
e45f2fed4b
2 changed files with 4 additions and 2 deletions
|
@ -37,6 +37,8 @@ const QByteArray* SentPacketHistory::getPacket(OCTREE_PACKET_SEQUENCE sequenceNu
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
int packetAt = _newestPacketAt - seqDiff;
|
int packetAt = _newestPacketAt - seqDiff;
|
||||||
if (packetAt < 0) { packetAt += _sentPackets.size(); }
|
if (packetAt < 0) {
|
||||||
|
packetAt += _sentPackets.size();
|
||||||
|
}
|
||||||
return &_sentPackets.at(packetAt);
|
return &_sentPackets.at(packetAt);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2123,7 +2123,7 @@ void Application::sendNack() {
|
||||||
|
|
||||||
QUuid nodeUUID = node->getUUID();
|
QUuid nodeUUID = node->getUUID();
|
||||||
|
|
||||||
_octreeSceneStatsLock.lockForWrite();
|
_octreeSceneStatsLock.lockForRead();
|
||||||
|
|
||||||
// retreive octree scene stats of this node
|
// retreive octree scene stats of this node
|
||||||
if (_octreeServerSceneStats.find(nodeUUID) == _octreeServerSceneStats.end()) {
|
if (_octreeServerSceneStats.find(nodeUUID) == _octreeServerSceneStats.end()) {
|
||||||
|
|
Loading…
Reference in a new issue