MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / addRecentPath

Method addRecentPath

Source/Mogwai/AppData.cpp:66–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 }
65
66 void AppData::addRecentPath(std::vector<std::filesystem::path>& paths, const std::filesystem::path& path)
67 {
68 if (!std::filesystem::exists(path)) return;
69 std::filesystem::path fullPath = std::filesystem::canonical(path);
70 paths.erase(std::remove(paths.begin(), paths.end(), fullPath), paths.end());
71 paths.insert(paths.begin(), fullPath);
72 if (paths.size() > kMaxRecentFiles) paths.resize(kMaxRecentFiles);
73 save();
74 }
75
76 void AppData::removeNonExistingPaths(std::vector<std::filesystem::path>& paths)
77 {

Callers

nothing calls this directly

Calls 7

saveFunction · 0.85
eraseMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected