diff --git a/code/AssetLib/AMF/AMFImporter.cpp b/code/AssetLib/AMF/AMFImporter.cpp index fed259a9b..556dbb30b 100644 --- a/code/AssetLib/AMF/AMFImporter.cpp +++ b/code/AssetLib/AMF/AMFImporter.cpp @@ -147,11 +147,11 @@ void AMFImporter::Throw_CloseNotFound(const std::string &pNode) { } void AMFImporter::Throw_IncorrectAttr(const std::string &pAttrName) { - throw DeadlyImportError("Node <", std::string(mReader->getNodeName()), "> has incorrect attribute \"", pAttrName, "\"."); + throw DeadlyImportError("Node <", mReader->getNodeName(), "> has incorrect attribute \"", pAttrName, "\"."); } void AMFImporter::Throw_IncorrectAttrValue(const std::string &pAttrName) { - throw DeadlyImportError("Attribute \"", pAttrName, "\" in node <", std::string(mReader->getNodeName()), "> has incorrect value."); + throw DeadlyImportError("Attribute \"", pAttrName, "\" in node <", mReader->getNodeName(), "> has incorrect value."); } void AMFImporter::Throw_MoreThanOnceDefined(const std::string &pNodeType, const std::string &pDescription) { diff --git a/code/AssetLib/Ogre/OgreXmlSerializer.cpp b/code/AssetLib/Ogre/OgreXmlSerializer.cpp index d3a6a5529..c1a9245aa 100644 --- a/code/AssetLib/Ogre/OgreXmlSerializer.cpp +++ b/code/AssetLib/Ogre/OgreXmlSerializer.cpp @@ -59,9 +59,9 @@ namespace Ogre { AI_WONT_RETURN void ThrowAttibuteError(const XmlReader *reader, const std::string &name, const std::string &error = "") AI_WONT_RETURN_SUFFIX; AI_WONT_RETURN void ThrowAttibuteError(const XmlReader *reader, const std::string &name, const std::string &error) { if (!error.empty()) { - throw DeadlyImportError(error, " in node '", std::string(reader->getNodeName()), "' and attribute '", name, "'"); + throw DeadlyImportError(error, " in node '", reader->getNodeName(), "' and attribute '", name, "'"); } else { - throw DeadlyImportError("Attribute '", name, "' does not exist in node '", std::string(reader->getNodeName()), "'"); + throw DeadlyImportError("Attribute '", name, "' does not exist in node '", reader->getNodeName(), "'"); } } diff --git a/code/AssetLib/X3D/X3DImporter.cpp b/code/AssetLib/X3D/X3DImporter.cpp index 94b11dee2..d521dcd9c 100644 --- a/code/AssetLib/X3D/X3DImporter.cpp +++ b/code/AssetLib/X3D/X3DImporter.cpp @@ -243,23 +243,23 @@ void X3DImporter::Throw_CloseNotFound(const std::string& pNode) void X3DImporter::Throw_ConvertFail_Str2ArrF(const std::string& pAttrValue) { - throw DeadlyImportError("In <", std::string(mReader->getNodeName()), "> failed to convert attribute value \"", pAttrValue, + throw DeadlyImportError("In <", mReader->getNodeName(), "> failed to convert attribute value \"", pAttrValue, "\" from string to array of floats."); } void X3DImporter::Throw_DEF_And_USE() { - throw DeadlyImportError("\"DEF\" and \"USE\" can not be defined both in <", std::string(mReader->getNodeName()), ">."); + throw DeadlyImportError("\"DEF\" and \"USE\" can not be defined both in <", mReader->getNodeName(), ">."); } void X3DImporter::Throw_IncorrectAttr(const std::string& pAttrName) { - throw DeadlyImportError("Node <", std::string(mReader->getNodeName()), "> has incorrect attribute \"", pAttrName, "\"."); + throw DeadlyImportError("Node <", mReader->getNodeName(), "> has incorrect attribute \"", pAttrName, "\"."); } void X3DImporter::Throw_IncorrectAttrValue(const std::string& pAttrName) { - throw DeadlyImportError("Attribute \"", pAttrName, "\" in node <", std::string(mReader->getNodeName()), "> has incorrect value."); + throw DeadlyImportError("Attribute \"", pAttrName, "\" in node <", mReader->getNodeName(), "> has incorrect value."); } void X3DImporter::Throw_MoreThanOnceDefined(const std::string& pNodeType, const std::string& pDescription) @@ -274,7 +274,7 @@ void X3DImporter::Throw_TagCountIncorrect(const std::string& pNode) void X3DImporter::Throw_USE_NotFound(const std::string& pAttrValue) { - throw DeadlyImportError("Not found node with name \"", pAttrValue, "\" in <", std::string(mReader->getNodeName()), ">."); + throw DeadlyImportError("Not found node with name \"", pAttrValue, "\" in <", mReader->getNodeName(), ">."); } /*********************************************************************************************************************************************/ @@ -1519,7 +1519,7 @@ void X3DImporter::ParseNode_Scene() auto GroupCounter_Increase = [](size_t& pCounter, const char* pGroupName) -> void { pCounter++; - if(pCounter == 0) throw DeadlyImportError("Group counter overflow. Too much groups with type: ", std::string(pGroupName), "."); + if(pCounter == 0) throw DeadlyImportError("Group counter overflow. Too much groups with type: ", pGroupName, "."); }; auto GroupCounter_Decrease = [&](size_t& pCounter, const char* pGroupName) -> void diff --git a/code/AssetLib/glTF/glTFAsset.inl b/code/AssetLib/glTF/glTFAsset.inl index 217bc8d47..41bdc508a 100644 --- a/code/AssetLib/glTF/glTFAsset.inl +++ b/code/AssetLib/glTF/glTFAsset.inl @@ -235,15 +235,15 @@ Ref LazyDict::Get(const char *id) { // read it from the JSON object if (!mDict) { - throw DeadlyImportError("GLTF: Missing section \"", std::string(mDictId), "\""); + throw DeadlyImportError("GLTF: Missing section \"", mDictId, "\""); } Value::MemberIterator obj = mDict->FindMember(id); if (obj == mDict->MemberEnd()) { - throw DeadlyImportError("GLTF: Missing object with id \"", std::string(id), "\" in \"", mDictId, "\""); + throw DeadlyImportError("GLTF: Missing object with id \"", id, "\" in \"", mDictId, "\""); } if (!obj->value.IsObject()) { - throw DeadlyImportError("GLTF: Object with id \"", std::string(id), "\" is not a JSON object"); + throw DeadlyImportError("GLTF: Object with id \"", id, "\" is not a JSON object"); } // create an instance of the given type @@ -339,9 +339,9 @@ inline void Buffer::Read(Value &obj, Asset &r) { delete file; if (!ok) - throw DeadlyImportError("GLTF: error while reading referenced file \"", std::string(uri), "\""); + throw DeadlyImportError("GLTF: error while reading referenced file \"", uri, "\""); } else { - throw DeadlyImportError("GLTF: could not open referenced file \"", std::string(uri), "\""); + throw DeadlyImportError("GLTF: could not open referenced file \"", uri, "\""); } } } diff --git a/code/AssetLib/glTF2/glTF2Asset.inl b/code/AssetLib/glTF2/glTF2Asset.inl index be23673ad..8ea621911 100644 --- a/code/AssetLib/glTF2/glTF2Asset.inl +++ b/code/AssetLib/glTF2/glTF2Asset.inl @@ -269,11 +269,11 @@ Ref LazyDict::Retrieve(unsigned int i) { // read it from the JSON object if (!mDict) { - throw DeadlyImportError("GLTF: Missing section \"", std::string(mDictId), "\""); + throw DeadlyImportError("GLTF: Missing section \"", mDictId, "\""); } if (!mDict->IsArray()) { - throw DeadlyImportError("GLTF: Field is not an array \"", std::string(mDictId), "\""); + throw DeadlyImportError("GLTF: Field is not an array \"", mDictId, "\""); } Value &obj = (*mDict)[i]; @@ -403,9 +403,9 @@ inline void Buffer::Read(Value &obj, Asset &r) { delete file; if (!ok) - throw DeadlyImportError("GLTF: error while reading referenced file \"", std::string(uri), "\""); + throw DeadlyImportError("GLTF: error while reading referenced file \"", uri, "\""); } else { - throw DeadlyImportError("GLTF: could not open referenced file \"", std::string(uri), "\""); + throw DeadlyImportError("GLTF: could not open referenced file \"", uri, "\""); } } }