From e5b91f00b0688d5cba6870da6d6ad3300097b07f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 24 Jan 2023 14:25:49 -0500 Subject: Common: Replace StringBeginsWith/StringEndsWith with std equivalents Obsoletes these functions in favor of the standard member functions added in C++20. --- Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp') diff --git a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp index af24232406..77d73a8eff 100644 --- a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp @@ -235,17 +235,16 @@ u32 CodeViewWidget::AddressForRow(int row) const static bool IsBranchInstructionWithLink(std::string_view ins) { - return StringEndsWith(ins, "l") || StringEndsWith(ins, "la") || StringEndsWith(ins, "l+") || - StringEndsWith(ins, "la+") || StringEndsWith(ins, "l-") || StringEndsWith(ins, "la-"); + return ins.ends_with('l') || ins.ends_with("la") || ins.ends_with("l+") || ins.ends_with("la+") || + ins.ends_with("l-") || ins.ends_with("la-"); } static bool IsInstructionLoadStore(std::string_view ins) { // Could add check for context address being near PC, because we need gprs to be correct for the // load/store. - return (StringBeginsWith(ins, "l") && !StringBeginsWith(ins, "li")) || - StringBeginsWith(ins, "st") || StringBeginsWith(ins, "psq_l") || - StringBeginsWith(ins, "psq_s"); + return (ins.starts_with('l') && !ins.starts_with("li")) || ins.starts_with("st") || + ins.starts_with("psq_l") || ins.starts_with("psq_s"); } void CodeViewWidget::Update() -- cgit v1.2.3