diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2023-01-24 21:51:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-24 21:51:15 +0100 |
| commit | 4b2c00e239f44e79190cc156e4557ea4aaf64bd2 (patch) | |
| tree | 09ec8ac31ff935d63aa9c06004802156ac96ebf5 /Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp | |
| parent | ba6ee9d7ba9730e5b2165ff0ee18cbc23762b129 (diff) | |
| parent | e5b91f00b0688d5cba6870da6d6ad3300097b07f (diff) | |
Merge pull request #11487 from lioncash/str
Common: Replace StringBeginsWith/StringEndsWith with std equivalents
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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() |
