diff options
| author | 2018-08-06 23:21:37 -0400 | |
|---|---|---|
| committer | 2018-08-08 21:18:45 -0400 | |
| commit | 2b6128fe0b8788318a4bbe1fc55ea14aed2981e4 (patch) | |
| tree | 39a8c25dbea98e2f8b5761f408d62cf1669f89bc /src/common/file_util.cpp | |
| parent | loader: Remove unused IdentifyFile overload (diff) | |
| download | yuzu-2b6128fe0b8788318a4bbe1fc55ea14aed2981e4.tar.gz yuzu-2b6128fe0b8788318a4bbe1fc55ea14aed2981e4.tar.xz yuzu-2b6128fe0b8788318a4bbe1fc55ea14aed2981e4.zip | |
file_util: Use enum instead of bool for specifing path behavior
Diffstat (limited to 'src/common/file_util.cpp')
| -rw-r--r-- | src/common/file_util.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index 190cac6d9..3ce590062 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp | |||
| @@ -884,12 +884,12 @@ std::string_view RemoveTrailingSlash(std::string_view path) { | |||
| 884 | return path; | 884 | return path; |
| 885 | } | 885 | } |
| 886 | 886 | ||
| 887 | std::string SanitizePath(std::string_view path_, bool with_platform_slashes) { | 887 | std::string SanitizePath(std::string_view path_, DirectorySeparator directory_separator) { |
| 888 | std::string path(path_); | 888 | std::string path(path_); |
| 889 | char type1 = '\\'; | 889 | char type1 = directory_separator == DirectorySeparator::BackwardSlash ? '/' : '\\'; |
| 890 | char type2 = '/'; | 890 | char type2 = directory_separator == DirectorySeparator::BackwardSlash ? '\\' : '/'; |
| 891 | 891 | ||
| 892 | if (with_platform_slashes) { | 892 | if (directory_separator == DirectorySeparator::PlatformDefault) { |
| 893 | #ifdef _WIN32 | 893 | #ifdef _WIN32 |
| 894 | type1 = '/'; | 894 | type1 = '/'; |
| 895 | type2 = '\\'; | 895 | type2 = '\\'; |