summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-11-11 09:08:08 +0100
committerRémi Verschelde <rverschelde@gmail.com>2021-11-11 11:23:32 +0100
commit2beaae4b6f1c4a2c3833a5e205157fd3be2fcabc (patch)
tree96b7ca74ef9f48ecba1181edb5ae85fca557242a /platform
parent171a69757f575bbc55c686956097c7b4434ec1f8 (diff)
String: Remove `erase` method, bindings can't mutate String
Diffstat (limited to 'platform')
-rw-r--r--platform/linuxbsd/crash_handler_linuxbsd.cpp2
-rw-r--r--platform/osx/crash_handler_osx.mm2
2 files changed, 2 insertions, 2 deletions
diff --git a/platform/linuxbsd/crash_handler_linuxbsd.cpp b/platform/linuxbsd/crash_handler_linuxbsd.cpp
index 0e98af71fa..9b24b24cb4 100644
--- a/platform/linuxbsd/crash_handler_linuxbsd.cpp
+++ b/platform/linuxbsd/crash_handler_linuxbsd.cpp
@@ -115,7 +115,7 @@ static void handle_crash(int sig) {
int ret;
Error err = OS::get_singleton()->execute(String("addr2line"), args, &output, &ret);
if (err == OK) {
- output.erase(output.length() - 1, 1);
+ output = output.substr(0, output.length() - 1);
}
fprintf(stderr, "[%ld] %s (%s)\n", (long int)i, fname, output.utf8().get_data());
diff --git a/platform/osx/crash_handler_osx.mm b/platform/osx/crash_handler_osx.mm
index 31228b10b4..2252d5eb4f 100644
--- a/platform/osx/crash_handler_osx.mm
+++ b/platform/osx/crash_handler_osx.mm
@@ -146,7 +146,7 @@ static void handle_crash(int sig) {
String out = "";
Error err = OS::get_singleton()->execute(String("atos"), args, &out, &ret);
if (err == OK && out.substr(0, 2) != "0x") {
- out.erase(out.length() - 1, 1);
+ out = out.substr(0, out.length() - 1);
output = out;
}
}