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

View file

@ -129,7 +129,7 @@ template<typename T> inline size_t ByteCountCoded<T>::decode(const char* encoded
bool inLeadBits = true; bool inLeadBits = true;
int bitAt = 0; int bitAt = 0;
int expectedBitCount; // unknown at this point int expectedBitCount; // unknown at this point
int lastValueBit; int lastValueBit = 0;
T bitValue = 1; T bitValue = 1;
for(int byte = 0; byte < encodedSize; byte++) { 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; bool inLeadBits = true;
int bitAt = 0; int bitAt = 0;
int expectedBitCount; // unknown at this point int expectedBitCount; // unknown at this point
int lastValueBit; int lastValueBit = 0;
for (unsigned int byte = 0; byte < size; byte++) { for (unsigned int byte = 0; byte < size; byte++) {
char originalByte = data[byte]; char originalByte = data[byte];
bytesConsumed++; bytesConsumed++;