summaryrefslogtreecommitdiffstats
path: root/core/debugger
diff options
context:
space:
mode:
Diffstat (limited to 'core/debugger')
-rw-r--r--core/debugger/debugger_marshalls.cpp8
-rw-r--r--core/debugger/engine_debugger.cpp2
-rw-r--r--core/debugger/remote_debugger.cpp3
-rw-r--r--core/debugger/remote_debugger_peer.cpp4
4 files changed, 8 insertions, 9 deletions
diff --git a/core/debugger/debugger_marshalls.cpp b/core/debugger/debugger_marshalls.cpp
index 3e6b7501c7..f4283e0ea9 100644
--- a/core/debugger/debugger_marshalls.cpp
+++ b/core/debugger/debugger_marshalls.cpp
@@ -38,10 +38,10 @@
Array DebuggerMarshalls::ScriptStackDump::serialize() {
Array arr;
arr.push_back(frames.size() * 3);
- for (int i = 0; i < frames.size(); i++) {
- arr.push_back(frames[i].file);
- arr.push_back(frames[i].line);
- arr.push_back(frames[i].func);
+ for (const ScriptLanguage::StackInfo &frame : frames) {
+ arr.push_back(frame.file);
+ arr.push_back(frame.line);
+ arr.push_back(frame.func);
}
return arr;
}
diff --git a/core/debugger/engine_debugger.cpp b/core/debugger/engine_debugger.cpp
index a7655c874a..97a020e4c3 100644
--- a/core/debugger/engine_debugger.cpp
+++ b/core/debugger/engine_debugger.cpp
@@ -137,7 +137,7 @@ void EngineDebugger::initialize(const String &p_uri, bool p_skip_breakpoints, co
script_debugger = memnew(ScriptDebugger);
// Tell the OS that we want to handle termination signals.
OS::get_singleton()->initialize_debugging();
- } else if (p_uri.find("://") >= 0) {
+ } else if (p_uri.contains("://")) {
const String proto = p_uri.substr(0, p_uri.find("://") + 3);
if (!protocols.has(proto)) {
return;
diff --git a/core/debugger/remote_debugger.cpp b/core/debugger/remote_debugger.cpp
index 1973663c72..bd30da3047 100644
--- a/core/debugger/remote_debugger.cpp
+++ b/core/debugger/remote_debugger.cpp
@@ -206,8 +206,7 @@ void RemoteDebugger::flush_output() {
Vector<String> joined_log_strings;
Vector<String> strings;
Vector<int> types;
- for (int i = 0; i < output_strings.size(); i++) {
- const OutputString &output_string = output_strings[i];
+ for (const OutputString &output_string : output_strings) {
if (output_string.type == MESSAGE_TYPE_ERROR) {
if (!joined_log_strings.is_empty()) {
strings.push_back(String("\n").join(joined_log_strings));
diff --git a/core/debugger/remote_debugger_peer.cpp b/core/debugger/remote_debugger_peer.cpp
index 81ee09f515..21a9014626 100644
--- a/core/debugger/remote_debugger_peer.cpp
+++ b/core/debugger/remote_debugger_peer.cpp
@@ -45,7 +45,7 @@ bool RemoteDebuggerPeerTCP::has_message() {
Array RemoteDebuggerPeerTCP::get_message() {
MutexLock lock(mutex);
ERR_FAIL_COND_V(!has_message(), Array());
- Array out = in_queue[0];
+ Array out = in_queue.front()->get();
in_queue.pop_front();
return out;
}
@@ -100,7 +100,7 @@ void RemoteDebuggerPeerTCP::_write_out() {
break; // Nothing left to send
}
mutex.lock();
- Variant var = out_queue[0];
+ Variant var = out_queue.front()->get();
out_queue.pop_front();
mutex.unlock();
int size = 0;