1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-01 07:09:41 +00:00

Make use of ends_with for KF

This commit is contained in:
Alexei Kotov 2023-01-15 01:48:06 +03:00
parent e24db874dc
commit 6ff9b5d326
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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))