From 29cd487f848eb6bdcd71a450b0f745c5d518910d Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 15 Mar 2016 11:26:20 -0700 Subject: [PATCH] fixes for styling and logging from CR --- assignment-client/src/assets/AssetServer.cpp | 5 ++--- interface/src/scripting/AssetMappingsScriptingInterface.cpp | 3 +-- libraries/script-engine/src/AssetScriptingInterface.cpp | 4 ---- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/assignment-client/src/assets/AssetServer.cpp b/assignment-client/src/assets/AssetServer.cpp index 4331b3ad31..d1e51d8545 100644 --- a/assignment-client/src/assets/AssetServer.cpp +++ b/assignment-client/src/assets/AssetServer.cpp @@ -222,8 +222,7 @@ void AssetServer::handleGetMappingOperation(ReceivedMessage& message, SharedNode auto assetHash = it->toString(); replyPacket.writePrimitive(AssetServerError::NoError); replyPacket.write(QByteArray::fromHex(assetHash.toUtf8())); - } - else { + } else { replyPacket.writePrimitive(AssetServerError::AssetNotFound); } } @@ -578,7 +577,7 @@ bool AssetServer::deleteMappings(AssetPathList& paths) { if (sizeBefore != sizeNow) { qDebug() << "Deleted" << sizeBefore - sizeNow << "mappings in folder: " << path; } else { - qDebug() << "Did not find any mappings in folder:" << path; + qDebug() << "Did not find any mappings to delete in folder:" << path; } } else { diff --git a/interface/src/scripting/AssetMappingsScriptingInterface.cpp b/interface/src/scripting/AssetMappingsScriptingInterface.cpp index 3c95eb007a..005f8a597c 100644 --- a/interface/src/scripting/AssetMappingsScriptingInterface.cpp +++ b/interface/src/scripting/AssetMappingsScriptingInterface.cpp @@ -225,8 +225,7 @@ void AssetMappingModel::refresh() { lastItem = item; _pathToItemMap[fullPath] = lastItem; - } - else { + } else { lastItem = it.value(); } } diff --git a/libraries/script-engine/src/AssetScriptingInterface.cpp b/libraries/script-engine/src/AssetScriptingInterface.cpp index aaa4f97fb3..80cd30a8b6 100644 --- a/libraries/script-engine/src/AssetScriptingInterface.cpp +++ b/libraries/script-engine/src/AssetScriptingInterface.cpp @@ -50,10 +50,6 @@ void AssetScriptingInterface::downloadData(QString urlString, QScriptValue callb auto parts = path.split(".", QString::SkipEmptyParts); auto hash = parts.length() > 0 ? parts[0] : ""; - if (hash.length() != SHA256_HASH_HEX_LENGTH) { - return; - } - auto assetClient = DependencyManager::get(); auto assetRequest = assetClient->createRequest(hash);