1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-04-10 06:44:29 +00:00

Use a wider type when converting to a signed type

This commit is contained in:
Cédric Mocquillon 2022-12-18 21:31:51 +01:00
parent 4daac2b816
commit 7e77e69a3c

View File

@ -199,10 +199,10 @@ std::string Misc::ResourceHelpers::getLODMeshName(
return ""; return "";
} }
}(); }();
for (char l = lod; l >= 0; --l) for (int l = lod; l >= 0; --l)
{ {
std::stringstream patern; std::stringstream patern;
patern << distantMeshPattern << "_" << int(l); patern << distantMeshPattern << "_" << l;
std::string const meshName = getBestLODMeshName(resPath, vfs, patern.str()); std::string const meshName = getBestLODMeshName(resPath, vfs, patern.str());
if (meshName != resPath) if (meshName != resPath)
return meshName; return meshName;