quiet compiler

This commit is contained in:
Seth Alves 2015-09-12 10:10:53 -07:00
parent 49ee251238
commit 93dc0714f7
3 changed files with 9 additions and 9 deletions

View file

@ -547,7 +547,7 @@ bool EntityScriptingInterface::actionWorker(const QUuid& entityID,
}
EntityItemPointer entity;
bool success;
bool doTransmit = false;
_entityTree->withWriteLock([&] {
EntitySimulation* simulation = _entityTree->getSimulation();
entity = _entityTree->findEntityByEntityItemID(entityID);
@ -561,14 +561,14 @@ bool EntityScriptingInterface::actionWorker(const QUuid& entityID,
return;
}
success = actor(simulation, entity);
if (success) {
doTransmit = actor(simulation, entity);
if (doTransmit) {
_entityTree->entityChanged(entity);
}
});
// transmit the change
if (success) {
if (doTransmit) {
EntityItemProperties properties;
_entityTree->withReadLock([&] {
properties = entity->getProperties();
@ -580,7 +580,7 @@ bool EntityScriptingInterface::actionWorker(const QUuid& entityID,
queueEntityMessage(PacketType::EntityEdit, entityID, properties);
}
return success;
return doTransmit;
}
@ -644,7 +644,7 @@ QVector<QUuid> EntityScriptingInterface::getActionIDs(const QUuid& entityID) {
actionWorker(entityID, [&](EntitySimulation* simulation, EntityItemPointer entity) {
QList<QUuid> actionIDs = entity->getActionIDs();
result = QVector<QUuid>::fromList(actionIDs);
return true;
return false; // don't send an edit packet
});
return result;
}
@ -653,7 +653,7 @@ QVariantMap EntityScriptingInterface::getActionArguments(const QUuid& entityID,
QVariantMap result;
actionWorker(entityID, [&](EntitySimulation* simulation, EntityItemPointer entity) {
result = entity->getActionArguments(actionID);
return true;
return false; // don't send an edit packet
});
return result;
}

View file

@ -129,7 +129,7 @@ template<typename T> inline size_t ByteCountCoded<T>::decode(const char* encoded
bool inLeadBits = true;
int bitAt = 0;
int expectedBitCount; // unknown at this point
int lastValueBit;
int lastValueBit = 0;
T bitValue = 1;
for(int byte = 0; byte < encodedSize; byte++) {

View file

@ -207,7 +207,7 @@ inline size_t PropertyFlags<Enum>::decode(const uint8_t* data, size_t size) {
bool inLeadBits = true;
int bitAt = 0;
int expectedBitCount; // unknown at this point
int lastValueBit;
int lastValueBit = 0;
for (unsigned int byte = 0; byte < size; byte++) {
char originalByte = data[byte];
bytesConsumed++;