mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-11-27 11:00:23 +00:00
registered_cache: Make use of ends_with for string suffix checking
Simplifies code.
This commit is contained in:
parent
f83c6e1e0c
commit
67a8e73101
1 changed files with 1 additions and 2 deletions
|
@ -257,8 +257,7 @@ std::vector<NcaID> PlaceholderCache::List() const {
|
||||||
for (const auto& sdir : dir->GetSubdirectories()) {
|
for (const auto& sdir : dir->GetSubdirectories()) {
|
||||||
for (const auto& file : sdir->GetFiles()) {
|
for (const auto& file : sdir->GetFiles()) {
|
||||||
const auto name = file->GetName();
|
const auto name = file->GetName();
|
||||||
if (name.length() == 36 && name[32] == '.' && name[33] == 'n' && name[34] == 'c' &&
|
if (name.length() == 36 && name.ends_with(".nca")) {
|
||||||
name[35] == 'a') {
|
|
||||||
out.push_back(Common::HexStringToArray<0x10>(name.substr(0, 32)));
|
out.push_back(Common::HexStringToArray<0x10>(name.substr(0, 32)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue