mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:23:53 +00:00
Use a functor for the mismatch compare function
This commit is contained in:
parent
9f0c1eeb7b
commit
4f46c8a8db
1 changed files with 7 additions and 5 deletions
|
@ -1057,10 +1057,12 @@ EntityList NIFLoader::createEntities(Ogre::SceneNode *parent, TextKeyMap *textke
|
|||
return entitylist;
|
||||
}
|
||||
|
||||
static bool checklow(const char &a, const char &b)
|
||||
{
|
||||
return ::tolower(a) == ::tolower(b);
|
||||
}
|
||||
struct checklow {
|
||||
bool operator()(const char &a, const char &b) const
|
||||
{
|
||||
return ::tolower(a) == ::tolower(b);
|
||||
}
|
||||
};
|
||||
|
||||
EntityList NIFLoader::createEntities(Ogre::Entity *parent, const std::string &bonename,
|
||||
Ogre::SceneNode *parentNode,
|
||||
|
@ -1081,7 +1083,7 @@ EntityList NIFLoader::createEntities(Ogre::Entity *parent, const std::string &bo
|
|||
if(ent->hasSkeleton())
|
||||
{
|
||||
if(meshes[i].second.length() < filter.length() ||
|
||||
std::mismatch(filter.begin(), filter.end(), meshes[i].second.begin(), checklow).first != filter.end())
|
||||
std::mismatch(filter.begin(), filter.end(), meshes[i].second.begin(), checklow()).first != filter.end())
|
||||
{
|
||||
sceneMgr->destroyEntity(ent);
|
||||
meshes.erase(meshes.begin()+i);
|
||||
|
|
Loading…
Reference in a new issue