summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FileUtil.cpp
diff options
context:
space:
mode:
authorLioncash <mai.iam2048@gmail.com>2023-01-24 14:25:49 -0500
committerLioncash <mai.iam2048@gmail.com>2023-01-24 14:58:20 -0500
commite5b91f00b0688d5cba6870da6d6ad3300097b07f (patch)
tree09ec8ac31ff935d63aa9c06004802156ac96ebf5 /Source/Core/Common/FileUtil.cpp
parentba6ee9d7ba9730e5b2165ff0ee18cbc23762b129 (diff)
Common: Replace StringBeginsWith/StringEndsWith with std equivalents
Obsoletes these functions in favor of the standard member functions added in C++20.
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
-rw-r--r--Source/Core/Common/FileUtil.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp
index 983e7d21a0..dfb82712d7 100644
--- a/Source/Core/Common/FileUtil.cpp
+++ b/Source/Core/Common/FileUtil.cpp
@@ -171,7 +171,7 @@ bool Delete(const std::string& filename, IfAbsentBehavior behavior)
DEBUG_LOG_FMT(COMMON, "Delete: file {}", filename);
#ifdef ANDROID
- if (StringBeginsWith(filename, "content://"))
+ if (filename.starts_with("content://"))
{
const bool success = DeleteAndroidContent(filename);
if (!success)
@@ -1054,7 +1054,7 @@ void SetUserPath(unsigned int dir_index, std::string path)
#endif
// Directories should end with a separator, files should not.
- while (StringEndsWith(path, "/"))
+ while (path.ends_with('/'))
path.pop_back();
if (path.empty())
return;