Optimize initialize UserPaths reserve count known paths

This commit is contained in:
Herman Semenov 2024-08-22 03:13:31 +03:00
parent 79680c50c0
commit 1e7a5d03b8
1 changed files with 1 additions and 0 deletions

View File

@ -93,6 +93,7 @@ static auto UserPaths = [] {
paths.insert_or_assign(shad_path, new_path); paths.insert_or_assign(shad_path, new_path);
}; };
paths.reserve(11);
create_path(PathType::UserDir, user_dir); create_path(PathType::UserDir, user_dir);
create_path(PathType::LogDir, user_dir / LOG_DIR); create_path(PathType::LogDir, user_dir / LOG_DIR);
create_path(PathType::ScreenshotsDir, user_dir / SCREENSHOTS_DIR); create_path(PathType::ScreenshotsDir, user_dir / SCREENSHOTS_DIR);