Clean up variable naming in HiresTextures::Update

This commit is contained in:
JosJuice 2018-01-10 17:53:51 +01:00
parent c25fffc9a0
commit 226b65bd38
1 changed files with 10 additions and 10 deletions

View File

@ -102,29 +102,29 @@ void HiresTexture::Update()
".jpg" // Why not? Could be useful for large photo-like textures ".jpg" // Why not? Could be useful for large photo-like textures
}; };
std::vector<std::string> filenames = const std::vector<std::string> texture_paths =
Common::DoFileSearch({texture_directory}, extensions, /*recursive*/ true); Common::DoFileSearch({texture_directory}, extensions, /*recursive*/ true);
const std::string code = game_id + "_"; const std::string code = game_id + "_";
for (auto& rFilename : filenames) for (auto& path : texture_paths)
{ {
std::string FileName; std::string filename;
SplitPath(rFilename, nullptr, &FileName, nullptr); SplitPath(path, nullptr, &filename, nullptr);
if (FileName.substr(0, code.length()) == code) if (filename.substr(0, code.length()) == code)
{ {
s_textureMap[FileName] = {rFilename, false}; s_textureMap[filename] = {path, false};
s_check_native_format = true; s_check_native_format = true;
} }
if (FileName.substr(0, s_format_prefix.length()) == s_format_prefix) if (filename.substr(0, s_format_prefix.length()) == s_format_prefix)
{ {
const size_t arb_index = FileName.rfind("_arb"); const size_t arb_index = filename.rfind("_arb");
const bool has_arbitrary_mipmaps = arb_index != std::string::npos; const bool has_arbitrary_mipmaps = arb_index != std::string::npos;
if (has_arbitrary_mipmaps) if (has_arbitrary_mipmaps)
FileName.erase(arb_index, 4); filename.erase(arb_index, 4);
s_textureMap[FileName] = {rFilename, has_arbitrary_mipmaps}; s_textureMap[filename] = {path, has_arbitrary_mipmaps};
s_check_new_format = true; s_check_new_format = true;
} }
} }