1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-05 11:15:34 +00:00

Avoid redundant string concatenations

This commit is contained in:
Chris Robinson 2013-01-29 01:36:17 -08:00
parent d4ddaa3d95
commit 0853fa335c

View file

@ -1204,14 +1204,14 @@ EntityList Loader::createEntities(Ogre::Entity *parent, const std::string &bonen
return entitylist; return entitylist;
Ogre::SceneManager *sceneMgr = parentNode->getCreator(); Ogre::SceneManager *sceneMgr = parentNode->getCreator();
std::string filter = bonename; std::string filter = "@shape=tri "+bonename;
Misc::StringUtils::toLower(filter); Misc::StringUtils::toLower(filter);
for(size_t i = 0;i < meshes.size();i++) for(size_t i = 0;i < meshes.size();i++)
{ {
Ogre::Entity *ent = sceneMgr->createEntity(meshes[i].mMeshName); Ogre::Entity *ent = sceneMgr->createEntity(meshes[i].mMeshName);
if(ent->hasSkeleton()) if(ent->hasSkeleton())
{ {
if(meshes[i].mMeshName.find("@shape=tri "+filter) == std::string::npos) if(meshes[i].mMeshName.find(filter) == std::string::npos)
{ {
sceneMgr->destroyEntity(ent); sceneMgr->destroyEntity(ent);
continue; continue;