aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/game_list.cpp
diff options
context:
space:
mode:
authorarades79 <scravers@protonmail.com>2023-02-11 13:28:03 -0500
committerarades79 <scravers@protonmail.com>2023-02-14 12:33:11 -0500
commit45e13b03f372230dbf780f3fa87dd88f388af605 (patch)
tree555593e7e5016b6ba2a777d7417ada244abce458 /src/yuzu/game_list.cpp
parent5f5a6e4b2e541e86c0bfdb99e3acfbbebe89a5d3 (diff)
add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
Diffstat (limited to 'src/yuzu/game_list.cpp')
-rw-r--r--src/yuzu/game_list.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp
index 22aa19c56..2e73c2719 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -476,8 +476,8 @@ void GameList::DonePopulating(const QStringList& watch_list) {
// Workaround: Add the watch paths in chunks to allow the gui to refresh
// This prevents the UI from stalling when a large number of watch paths are added
// Also artificially caps the watcher to a certain number of directories
- constexpr int LIMIT_WATCH_DIRECTORIES = 5000;
- constexpr int SLICE_SIZE = 25;
+ constexpr static int LIMIT_WATCH_DIRECTORIES = 5000;
+ constexpr static int SLICE_SIZE = 25;
int len = std::min(static_cast<int>(watch_list.size()), LIMIT_WATCH_DIRECTORIES);
for (int i = 0; i < len; i += SLICE_SIZE) {
watcher->addPaths(watch_list.mid(i, i + SLICE_SIZE));