summaryrefslogtreecommitdiffstats
path: root/core/debugger
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-11-19 11:38:29 -0500
committerSpartan322 <Megacake1234@gmail.com>2024-11-19 11:39:37 -0500
commitcfc378b251e4330c6b6be949d4c054f9bae48159 (patch)
tree148a5511d3c1d723b2f2f364c832c2ba6f267fcc /core/debugger
parent9767837a7ec40697788765e581131cb2cf172567 (diff)
parentfd4c29a189e53a1e085df5b9b9a05cac9351b3ef (diff)
downloadredot-engine-cfc378b251e4330c6b6be949d4c054f9bae48159.tar.gz
Merge commit godotengine/godot@fd4c29a189e53a1e085df5b9b9a05cac9351b3ef
Diffstat (limited to 'core/debugger')
-rw-r--r--core/debugger/engine_debugger.cpp2
-rw-r--r--core/debugger/local_debugger.cpp4
-rw-r--r--core/debugger/remote_debugger.cpp4
-rw-r--r--core/debugger/remote_debugger_peer.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/core/debugger/engine_debugger.cpp b/core/debugger/engine_debugger.cpp
index 0928180591..ffff4e2360 100644
--- a/core/debugger/engine_debugger.cpp
+++ b/core/debugger/engine_debugger.cpp
@@ -165,7 +165,7 @@ void EngineDebugger::initialize(const String &p_uri, bool p_skip_breakpoints, co
for (int i = 0; i < p_breakpoints.size(); i++) {
const String &bp = p_breakpoints[i];
- int sp = bp.rfind(":");
+ int sp = bp.rfind_char(':');
ERR_CONTINUE_MSG(sp == -1, vformat("Invalid breakpoint: '%s', expected file:line format.", bp));
singleton_script_debugger->insert_breakpoint(bp.substr(sp + 1, bp.length()).to_int(), bp.substr(0, sp));
diff --git a/core/debugger/local_debugger.cpp b/core/debugger/local_debugger.cpp
index 965dfa96c3..40e8b7ffb7 100644
--- a/core/debugger/local_debugger.cpp
+++ b/core/debugger/local_debugger.cpp
@@ -173,7 +173,7 @@ void LocalDebugger::debug(bool p_can_continue, bool p_is_error_breakpoint) {
} else {
String key_value = line.get_slicec(' ', 1);
- int value_pos = key_value.find("=");
+ int value_pos = key_value.find_char('=');
if (value_pos < 0) {
print_line("Error: Invalid set format. Use: set key=value");
@@ -346,7 +346,7 @@ Pair<String, int> LocalDebugger::to_breakpoint(const String &p_line) {
String breakpoint_part = p_line.get_slicec(' ', 1);
Pair<String, int> breakpoint;
- int last_colon = breakpoint_part.rfind(":");
+ int last_colon = breakpoint_part.rfind_char(':');
if (last_colon < 0) {
print_line("Error: Invalid breakpoint format. Expected [source:line]");
return breakpoint;
diff --git a/core/debugger/remote_debugger.cpp b/core/debugger/remote_debugger.cpp
index b69a7db989..bc11cbe56a 100644
--- a/core/debugger/remote_debugger.cpp
+++ b/core/debugger/remote_debugger.cpp
@@ -340,7 +340,7 @@ void RemoteDebugger::_send_stack_vars(List<String> &p_names, List<Variant> &p_va
}
Error RemoteDebugger::_try_capture(const String &p_msg, const Array &p_data, bool &r_captured) {
- const int idx = p_msg.find(":");
+ const int idx = p_msg.find_char(':');
r_captured = false;
if (idx < 0) { // No prefix, unknown message.
return OK;
@@ -612,7 +612,7 @@ void RemoteDebugger::poll_events(bool p_is_idle) {
ERR_CONTINUE(arr[1].get_type() != Variant::ARRAY);
const String cmd = arr[0];
- const int idx = cmd.find(":");
+ const int idx = cmd.find_char(':');
bool parsed = false;
if (idx < 0) { // Not prefix, use scripts capture.
capture_parse("core", cmd, arr[1], parsed);
diff --git a/core/debugger/remote_debugger_peer.cpp b/core/debugger/remote_debugger_peer.cpp
index 45a433e125..17b6f5a48c 100644
--- a/core/debugger/remote_debugger_peer.cpp
+++ b/core/debugger/remote_debugger_peer.cpp
@@ -226,7 +226,7 @@ RemoteDebuggerPeer *RemoteDebuggerPeerTCP::create(const String &p_uri) {
uint16_t debug_port = 6007;
if (debug_host.contains(":")) {
- int sep_pos = debug_host.rfind(":");
+ int sep_pos = debug_host.rfind_char(':');
debug_port = debug_host.substr(sep_pos + 1).to_int();
debug_host = debug_host.substr(0, sep_pos);
}