summaryrefslogtreecommitdiff
path: root/core/debugger
diff options
context:
space:
mode:
authorAnilforextra <anilforextra@gmail.com>2022-02-02 00:04:13 +0545
committerAnilforextra <anilforextra@gmail.com>2022-02-02 00:11:09 +0545
commitfc27636999a15f88b1f3b1d7101d84a67968ba06 (patch)
treee3b66fce3dfd70ef1e7d5a4d1543446af2deae47 /core/debugger
parentea12094f19b028c1dcf6d402b8cbb3296b2065a8 (diff)
Vectors: Use clear() and has().
Use clear() instead of resize(0). Use has() instead of "find(p_val) != -1".
Diffstat (limited to 'core/debugger')
-rw-r--r--core/debugger/remote_debugger_peer.cpp4
-rw-r--r--core/debugger/script_debugger.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/debugger/remote_debugger_peer.cpp b/core/debugger/remote_debugger_peer.cpp
index a45430465f..715468489c 100644
--- a/core/debugger/remote_debugger_peer.cpp
+++ b/core/debugger/remote_debugger_peer.cpp
@@ -68,8 +68,8 @@ void RemoteDebuggerPeerTCP::close() {
running = false;
thread.wait_to_finish();
tcp_client->disconnect_from_host();
- out_buf.resize(0);
- in_buf.resize(0);
+ out_buf.clear();
+ in_buf.clear();
}
RemoteDebuggerPeerTCP::RemoteDebuggerPeerTCP(Ref<StreamPeerTCP> p_tcp) {
diff --git a/core/debugger/script_debugger.cpp b/core/debugger/script_debugger.cpp
index 36723e5568..4dd93249ef 100644
--- a/core/debugger/script_debugger.cpp
+++ b/core/debugger/script_debugger.cpp
@@ -104,7 +104,7 @@ void ScriptDebugger::send_error(const String &p_func, const String &p_file, int
// Store stack info, this is ugly, but allows us to separate EngineDebugger and ScriptDebugger. There might be a better way.
error_stack_info.append_array(p_stack_info);
EngineDebugger::get_singleton()->send_error(p_func, p_file, p_line, p_err, p_descr, p_editor_notify, p_type);
- error_stack_info.resize(0);
+ error_stack_info.clear();
}
Vector<ScriptLanguage::StackInfo> ScriptDebugger::get_error_stack_info() const {