diff options
| author | Sintendo <3380580+Sintendo@users.noreply.github.com> | 2025-12-24 10:14:02 +0100 |
|---|---|---|
| committer | Sintendo <3380580+Sintendo@users.noreply.github.com> | 2026-01-24 16:50:10 +0100 |
| commit | f2e1c71803b953c9adb9528c168cbbde23b3b30a (patch) | |
| tree | 276c17d2bbfaebc6dc2193e1f6e3a6f387eb0787 /Source/Core/UICommon/GameFileCache.cpp | |
| parent | 3221e982d371afd39793628bf8973f3cc951db35 (diff) | |
Common/FileSearch: Refactor DoFileSearch
Diffstat (limited to 'Source/Core/UICommon/GameFileCache.cpp')
| -rw-r--r-- | Source/Core/UICommon/GameFileCache.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/UICommon/GameFileCache.cpp b/Source/Core/UICommon/GameFileCache.cpp index f72f47c11e..4c93fb7640 100644 --- a/Source/Core/UICommon/GameFileCache.cpp +++ b/Source/Core/UICommon/GameFileCache.cpp @@ -28,12 +28,12 @@ namespace UICommon { static constexpr u32 CACHE_REVISION = 26; // Last changed in PR 10084 -std::vector<std::string> FindAllGamePaths(const std::vector<std::string>& directories_to_scan, +std::vector<std::string> FindAllGamePaths(std::span<const std::string_view> directories_to_scan, bool recursive_scan) { - static const std::vector<std::string> search_extensions = { - ".gcm", ".tgc", ".bin", ".iso", ".ciso", ".gcz", ".wbfs", - ".wia", ".rvz", ".nfs", ".wad", ".dol", ".elf", ".json"}; + constexpr auto search_extensions = + std::to_array<std::string_view>({".gcm", ".tgc", ".bin", ".iso", ".ciso", ".gcz", ".wbfs", + ".wia", ".rvz", ".nfs", ".wad", ".dol", ".elf", ".json"}); // TODO: We could process paths iteratively as they are found return Common::DoFileSearch(directories_to_scan, search_extensions, recursive_scan); |
