mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 12:42:11 +00:00
Simplify NodeMapVisitor::apply
No need to run a find() before a std::replace
This commit is contained in:
parent
df3a47187b
commit
895864099c
@ -65,11 +65,7 @@ namespace SceneUtil
|
||||
if (trans.libraryName() == std::string("osgAnimation"))
|
||||
{
|
||||
// Convert underscores to whitespaces as a workaround for Collada (OpenMW's animation system uses whitespace-separated names)
|
||||
std::string underscore = "_";
|
||||
std::size_t foundUnderscore = originalNodeName.find(underscore);
|
||||
|
||||
if (foundUnderscore != std::string::npos)
|
||||
std::replace(originalNodeName.begin(), originalNodeName.end(), '_', ' ');
|
||||
std::replace(originalNodeName.begin(), originalNodeName.end(), '_', ' ');
|
||||
}
|
||||
|
||||
const std::string nodeName = originalNodeName;
|
||||
|
Loading…
Reference in New Issue
Block a user