From 1e7a5d03b8a1923dada9f7c8f1ef415967f660f9 Mon Sep 17 00:00:00 2001 From: Herman Semenov Date: Thu, 22 Aug 2024 03:13:31 +0300 Subject: [PATCH] Optimize initialize UserPaths reserve count known paths --- src/common/path_util.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/path_util.cpp b/src/common/path_util.cpp index d69f7216..3bac751a 100644 --- a/src/common/path_util.cpp +++ b/src/common/path_util.cpp @@ -93,6 +93,7 @@ static auto UserPaths = [] { paths.insert_or_assign(shad_path, new_path); }; + paths.reserve(11); create_path(PathType::UserDir, user_dir); create_path(PathType::LogDir, user_dir / LOG_DIR); create_path(PathType::ScreenshotsDir, user_dir / SCREENSHOTS_DIR);