summaryrefslogtreecommitdiff
path: root/Source/Core/Common/StringUtil.cpp
diff options
context:
space:
mode:
authormitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-09-29 11:08:08 -0700
committermitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-10-10 00:53:48 -0700
commit0a80243a926fdab20ef0a57411e80bead989128f (patch)
treeff8af63b99fb1446bf3dc41c987af5c80ff7445d /Source/Core/Common/StringUtil.cpp
parent72436a0d1f0c9c4c67f8763e0ec2f0941a975e02 (diff)
Modernize `std::replace` with ranges
Diffstat (limited to 'Source/Core/Common/StringUtil.cpp')
-rw-r--r--Source/Core/Common/StringUtil.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp
index d3e7caacdf..935db75d2f 100644
--- a/Source/Core/Common/StringUtil.cpp
+++ b/Source/Core/Common/StringUtil.cpp
@@ -234,8 +234,8 @@ std::string_view StripQuotes(std::string_view s)
// Turns "\n\rhello" into " hello".
void ReplaceBreaksWithSpaces(std::string& str)
{
- std::replace(str.begin(), str.end(), '\r', ' ');
- std::replace(str.begin(), str.end(), '\n', ' ');
+ std::ranges::replace(str, '\r', ' ');
+ std::ranges::replace(str, '\n', ' ');
}
void TruncateToCString(std::string* s)