mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-05 11:45:34 +00:00
Avoid redundant string concatenations
This commit is contained in:
parent
d4ddaa3d95
commit
0853fa335c
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue