diff options
| author | 2023-12-16 11:47:29 -0500 | |
|---|---|---|
| committer | 2023-12-16 11:47:29 -0500 | |
| commit | 360418f1a14cdbc39bd84231f56d4c1b57ee5e39 (patch) | |
| tree | 362313094902d38e0a7dbab1193e543120e21483 /src/common/fs/path_util.h | |
| parent | Merge pull request #12344 from liamwhite/its-free-real-estate (diff) | |
| parent | Improve path splitting speed (diff) | |
| download | yuzu-360418f1a14cdbc39bd84231f56d4c1b57ee5e39.tar.gz yuzu-360418f1a14cdbc39bd84231f56d4c1b57ee5e39.tar.xz yuzu-360418f1a14cdbc39bd84231f56d4c1b57ee5e39.zip | |
Merge pull request #12290 from liamwhite/deferred-path-split
Improve path splitting speed
Diffstat (limited to 'src/common/fs/path_util.h')
| -rw-r--r-- | src/common/fs/path_util.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/fs/path_util.h b/src/common/fs/path_util.h index 2874ea738..23c8b1359 100644 --- a/src/common/fs/path_util.h +++ b/src/common/fs/path_util.h | |||
| @@ -289,7 +289,11 @@ enum class DirectorySeparator { | |||
| 289 | 289 | ||
| 290 | // Splits the path on '/' or '\' and put the components into a vector | 290 | // Splits the path on '/' or '\' and put the components into a vector |
| 291 | // i.e. "C:\Users\Yuzu\Documents\save.bin" becomes {"C:", "Users", "Yuzu", "Documents", "save.bin" } | 291 | // i.e. "C:\Users\Yuzu\Documents\save.bin" becomes {"C:", "Users", "Yuzu", "Documents", "save.bin" } |
| 292 | [[nodiscard]] std::vector<std::string> SplitPathComponents(std::string_view filename); | 292 | [[nodiscard]] std::vector<std::string_view> SplitPathComponents(std::string_view filename); |
| 293 | |||
| 294 | // Splits the path on '/' or '\' and put the components into a vector | ||
| 295 | // i.e. "C:\Users\Yuzu\Documents\save.bin" becomes {"C:", "Users", "Yuzu", "Documents", "save.bin" } | ||
| 296 | [[nodiscard]] std::vector<std::string> SplitPathComponentsCopy(std::string_view filename); | ||
| 293 | 297 | ||
| 294 | // Removes trailing slash, makes all '\\' into '/', and removes duplicate '/'. Makes '/' into '\\' | 298 | // Removes trailing slash, makes all '\\' into '/', and removes duplicate '/'. Makes '/' into '\\' |
| 295 | // depending if directory_separator is BackwardSlash or PlatformDefault and running on windows | 299 | // depending if directory_separator is BackwardSlash or PlatformDefault and running on windows |