switch from autos

This commit is contained in:
humbletim 2017-02-24 19:21:17 -05:00
parent cdbb13ecff
commit 731c01985b

View file

@ -1506,7 +1506,7 @@ void ScriptEngine::processDeferredEntityLoads(const QString& entityScript, const
i.remove(); i.remove();
} }
} }
foreach(auto &retry, retryLoads) { foreach(DeferredLoadEntity retry, retryLoads) {
// check whether entity was since been deleted // check whether entity was since been deleted
if (!_entityScripts.contains(retry.entityID)) { if (!_entityScripts.contains(retry.entityID)) {
qCDebug(scriptengine) << "processDeferredEntityLoads -- entity details gone (entity deleted?)" qCDebug(scriptengine) << "processDeferredEntityLoads -- entity details gone (entity deleted?)"
@ -1528,7 +1528,7 @@ void ScriptEngine::processDeferredEntityLoads(const QString& entityScript, const
qCDebug(scriptengine) << QString("... pending load of %1 cancelled (leader: %2 status: %3)") qCDebug(scriptengine) << QString("... pending load of %1 cancelled (leader: %2 status: %3)")
.arg(retry.entityID.toString()).arg(leaderID.toString()).arg(leaderDetails.status); .arg(retry.entityID.toString()).arg(leaderID.toString()).arg(leaderDetails.status);
auto extraDetail = "\n(propagated from " + leaderID.toString() + ")"; auto extraDetail = QString("\n(propagated from %1)").arg(leaderID.toString());
if (leaderDetails.status == EntityScriptStatus::ERROR_LOADING_SCRIPT || if (leaderDetails.status == EntityScriptStatus::ERROR_LOADING_SCRIPT ||
leaderDetails.status == EntityScriptStatus::ERROR_RUNNING_SCRIPT) { leaderDetails.status == EntityScriptStatus::ERROR_RUNNING_SCRIPT) {
// propagate same error so User doesn't have to hunt down stampede's leader // propagate same error so User doesn't have to hunt down stampede's leader
@ -1679,7 +1679,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co
auto fileName = isURL ? scriptOrURL : "about:EmbeddedEntityScript"; auto fileName = isURL ? scriptOrURL : "about:EmbeddedEntityScript";
const EntityScriptDetails &oldDetails = _entityScripts[entityID]; const EntityScriptDetails &oldDetails = _entityScripts[entityID];
const auto entityScript = oldDetails.scriptText; const QString entityScript = oldDetails.scriptText;
EntityScriptDetails newDetails; EntityScriptDetails newDetails;
newDetails.scriptText = scriptOrURL; newDetails.scriptText = scriptOrURL;
@ -1852,7 +1852,7 @@ void ScriptEngine::unloadEntityScript(const EntityItemID& entityID) {
#endif #endif
if (_entityScripts.contains(entityID)) { if (_entityScripts.contains(entityID)) {
auto oldDetails = _entityScripts[entityID]; const EntityScriptDetails &oldDetails = _entityScripts[entityID];
if (isEntityScriptRunning(entityID)) { if (isEntityScriptRunning(entityID)) {
callEntityScriptMethod(entityID, "unload"); callEntityScriptMethod(entityID, "unload");
} else { } else {