Apply modernize-use-starts-ends-with

This commit is contained in:
Nicolas van Kempen
2024-04-19 14:24:34 -04:00
parent 1805f6e381
commit 932645f245
4 changed files with 8 additions and 8 deletions

View File

@ -88,7 +88,7 @@ ResourcePack::ResourcePack(const std::string& path) : m_path(path)
unzGetCurrentFileInfo64(file, &texture_info, filename.data(), static_cast<u16>(filename.size()),
nullptr, 0, nullptr, 0);
if (filename.compare(0, 9, "textures/") != 0 || texture_info.uncompressed_size == 0)
if (!filename.starts_with("textures/") || texture_info.uncompressed_size == 0)
continue;
// If a texture is compressed and the manifest doesn't state that, abort.