diff --git a/code/AssetLib/Collada/ColladaParser.cpp b/code/AssetLib/Collada/ColladaParser.cpp index a5dcab19b..595b8daf2 100644 --- a/code/AssetLib/Collada/ColladaParser.cpp +++ b/code/AssetLib/Collada/ColladaParser.cpp @@ -256,6 +256,7 @@ void ColladaParser::ReadContents(XmlNode &node) { void ColladaParser::ReadStructure(XmlNode &node) { for (XmlNode currentNode = node.first_child(); currentNode; currentNode = currentNode.next_sibling()) { const std::string name = std::string(currentNode.name()); + ASSIMP_LOG_DEBUG("last name" + name); if (name == "asset") ReadAssetInfo(currentNode); else if (name == "library_animations") @@ -405,7 +406,7 @@ void ColladaParser::PostProcessControllers() { for (ControllerLibrary::iterator it = mControllerLibrary.begin(); it != mControllerLibrary.end(); ++it) { meshId = it->second.mMeshId; if (meshId.empty()) { - break; + continue; } ControllerLibrary::iterator findItr = mControllerLibrary.find(meshId); diff --git a/include/assimp/StringUtils.h b/include/assimp/StringUtils.h index 545a9ff30..57b88ea5e 100644 --- a/include/assimp/StringUtils.h +++ b/include/assimp/StringUtils.h @@ -165,6 +165,7 @@ AI_FORCE_INLINE std::string Rgba2Hex(int r, int g, int b, int a, bool with_head) return ss.str(); } +// trim from start (in place) inline void ltrim(std::string &s) { s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) { return !std::isspace(ch); @@ -183,4 +184,5 @@ inline void trim(std::string &s) { ltrim(s); rtrim(s); } + #endif // INCLUDED_AI_STRINGUTILS_H