Remove a few more string allocations/manipulations

This commit is contained in:
auria.mg 2017-03-08 20:42:16 -05:00
parent 571832fbbc
commit 2d6cf4c487

View File

@ -80,8 +80,7 @@ Material* MaterialManager::getMaterialFor(video::ITexture* t,
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
Material* MaterialManager::getMaterialFor(video::ITexture* t) Material* MaterialManager::getMaterialFor(video::ITexture* t)
{ {
core::stringc img_path = core::stringc(t->getName()); const io::path& img_path = t->getName().getInternalName();
img_path.make_lower();
if (!img_path.empty() && (img_path.findFirst('/') != -1 || img_path.findFirst('\\') != -1)) if (!img_path.empty() && (img_path.findFirst('/') != -1 || img_path.findFirst('\\') != -1))
{ {