From fc27636999a15f88b1f3b1d7101d84a67968ba06 Mon Sep 17 00:00:00 2001 From: Anilforextra Date: Wed, 2 Feb 2022 00:04:13 +0545 Subject: Vectors: Use clear() and has(). Use clear() instead of resize(0). Use has() instead of "find(p_val) != -1". --- core/debugger/remote_debugger_peer.cpp | 4 ++-- core/debugger/script_debugger.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core/debugger') 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 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 ScriptDebugger::get_error_stack_info() const { -- cgit v1.2.3