mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-29 13:20:35 +00:00
Make use of ends_with for KF
This commit is contained in:
parent
e24db874dc
commit
6ff9b5d326
@ -609,7 +609,7 @@ namespace MWRender
|
||||
{
|
||||
std::string kfname = Misc::StringUtils::lowerCase(model);
|
||||
|
||||
if (kfname.size() > 4 && kfname.compare(kfname.size() - 4, 4, ".nif") == 0)
|
||||
if (kfname.ends_with(".nif"))
|
||||
kfname.replace(kfname.size() - 4, 4, ".kf");
|
||||
|
||||
addSingleAnimSource(kfname, baseModel);
|
||||
|
@ -135,7 +135,7 @@ std::string Misc::ResourceHelpers::correctActorModelPath(const std::string& resP
|
||||
else
|
||||
mdlname.insert(mdlname.begin(), 'x');
|
||||
std::string kfname = mdlname;
|
||||
if (kfname.size() > 4 && kfname.compare(kfname.size() - 4, 4, ".nif") == 0)
|
||||
if (kfname.ends_with(".nif"))
|
||||
kfname.replace(kfname.size() - 4, 4, ".kf");
|
||||
|
||||
if (!vfs->exists(kfname))
|
||||
|
Loading…
x
Reference in New Issue
Block a user