Skip to content

Commit

Permalink
[POSIX -> ISO C++] strcmpi.
Browse files Browse the repository at this point in the history
  • Loading branch information
tamlin-mike authored and Xottab-DUTY committed Aug 5, 2017
1 parent f9c8e21 commit f6e3fd5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/xrEngine/GameMtlLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ typedef xr_vector<shared_str> PSVec;
typedef PSVec::iterator PSIt;
#endif

#include "xrCore/xrDebug_macros.h"
#pragma todo("Place at least CGameMtlLibrary in a static lib or something. It currently gets instantiated a huge amount of times.")

struct MTL_EXPORT_API SGameMtl
{
friend class CGameMtlLibrary;
Expand Down Expand Up @@ -247,7 +250,7 @@ class MTL_EXPORT_API CGameMtlLibrary

GameMtlIt GetMaterialIt(LPCSTR name)
{
auto pred = [&](const SGameMtl* mtl) { return !strcmpi(mtl->m_Name.c_str(), name); };
auto pred = [&](const SGameMtl* mtl) { return !_strcmpi(mtl->m_Name.c_str(), name); };
return std::find_if(materials.begin(), materials.end(), pred);
}
GameMtlIt GetMaterialIt(shared_str& name)
Expand Down

0 comments on commit f6e3fd5

Please sign in to comment.