mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 05:52:38 +02:00
stylistic and memory management fixes
This commit is contained in:
parent
7b498edcbc
commit
3b976500ce
3 changed files with 5 additions and 4 deletions
|
@ -386,14 +386,15 @@ int main(int argc, const char* argv[]) {
|
|||
delete *assignment;
|
||||
}
|
||||
} else {
|
||||
Assignment *sentAssignment = *assignment;
|
||||
// remove the assignment from the queue
|
||||
::assignmentQueue.erase(assignment);
|
||||
|
||||
if ((*assignment)->getType() != Assignment::VoxelServerType) {
|
||||
if (sentAssignment->getType() != Assignment::VoxelServerType) {
|
||||
// keep audio-mixer and avatar-mixer assignments in the queue
|
||||
// until we get a check-in from that GUID
|
||||
// but stick it at the back so the others have a chance to go out
|
||||
::assignmentQueue.push_back(*assignment);
|
||||
::assignmentQueue.push_back(sentAssignment);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ Assignment::Assignment(const unsigned char* dataBuffer, int numBytes) :
|
|||
memcpy(&_type, dataBuffer + numBytesRead, sizeof(Assignment::Type));
|
||||
numBytesRead += sizeof(Assignment::Type);
|
||||
|
||||
if (dataBuffer[0] != PACKET_TYPE_REQUEST_ASSIGNMENT) {
|
||||
if (_command != Assignment::RequestCommand) {
|
||||
// read the GUID for this assignment
|
||||
_uuid = QUuid::fromRfc4122(QByteArray((const char*) dataBuffer + numBytesRead, NUM_BYTES_RFC4122_UUID));
|
||||
numBytesRead += NUM_BYTES_RFC4122_UUID;
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
|
||||
Assignment(Assignment::Command command,
|
||||
Assignment::Type type,
|
||||
Assignment::Location location = Assignment::GlobalLocation);
|
||||
Assignment::Location location = Assignment::LocalLocation);
|
||||
|
||||
/// Constructs an Assignment from the data in the buffer
|
||||
/// \param dataBuffer the source buffer to un-pack the assignment from
|
||||
|
|
Loading…
Reference in a new issue