History

get rid of magic number

Seth Alves committed 10 years ago

Commit 672b4df1 parent 21c2db71 file · +3 −2Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+3−2
@@ -1094,8 +1094,9 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 1093 unmodified lines
1094 testConstructorType = "empty";1094 testConstructorType = "empty";
1095 }1095 }
1096 QString testConstructorValue = testConstructor.toString();1096 QString testConstructorValue = testConstructor.toString();
1097 if (testConstructorValue.size() > 80) {1097 const int maxTestConstructorValueSize = 80;
1098 testConstructorValue = testConstructorValue.mid(0, 80) + "...";1098 if (testConstructorValue.size() > maxTestConstructorValueSize) {
1099 testConstructorValue = testConstructorValue.mid(0, maxTestConstructorValueSize) + "...";
1099 }1100 }
1100 qCDebug(scriptengine) << "Error -- ScriptEngine::loadEntityScript() entity:" << entityID1101 qCDebug(scriptengine) << "Error -- ScriptEngine::loadEntityScript() entity:" << entityID
1101 << "failed to load entity script -- expected a function, got " + testConstructorType1102 << "failed to load entity script -- expected a function, got " + testConstructorType