diff --git a/code/AssetLib/Obj/ObjFileMtlImporter.cpp b/code/AssetLib/Obj/ObjFileMtlImporter.cpp index f8e3e1cde..effdf627f 100644 --- a/code/AssetLib/Obj/ObjFileMtlImporter.cpp +++ b/code/AssetLib/Obj/ObjFileMtlImporter.cpp @@ -343,7 +343,7 @@ void ObjFileMtlImporter::createMaterial() { } } - name = trim_whitespaces(name); + name = ai_trim(name); std::map::iterator it = m_pModel->mMaterialMap.find(name); if (m_pModel->mMaterialMap.end() == it) { diff --git a/code/AssetLib/Obj/ObjFileParser.cpp b/code/AssetLib/Obj/ObjFileParser.cpp index ed41f2273..fec1fe87b 100644 --- a/code/AssetLib/Obj/ObjFileParser.cpp +++ b/code/AssetLib/Obj/ObjFileParser.cpp @@ -577,7 +577,7 @@ void ObjFileParser::getMaterialDesc() { // Get name std::string strName(pStart, &(*m_DataIt)); - strName = trim_whitespaces(strName); + strName = ai_trim(strName); if (strName.empty()) { skip = true; } diff --git a/code/AssetLib/Obj/ObjTools.h b/code/AssetLib/Obj/ObjTools.h index 664402ee3..ac5e119f2 100644 --- a/code/AssetLib/Obj/ObjTools.h +++ b/code/AssetLib/Obj/ObjTools.h @@ -247,22 +247,6 @@ inline char_t getFloat(char_t it, char_t end, ai_real &value) { return it; } -/** - * @brief Will remove white-spaces for a string. - * @param[in] str The string to clean - * @return The trimmed string. - */ -template -inline string_type trim_whitespaces(string_type str) { - while (!str.empty() && IsSpace(str[0])) { - str.erase(0); - } - while (!str.empty() && IsSpace(str[str.length() - 1])) { - str.erase(str.length() - 1); - } - return str; -} - /** * @brief Checks for a line-end. * @param[in] it Current iterator in string.