mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-17 08:37:43 +00:00
add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user