diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 23:09:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 23:09:03 +0200 |
commit | 00949f0c5fcc6a4f8382a4a97d5591fd9ec380f8 (patch) | |
tree | 2b1c31f45add24085b64425ce440f577424c16a1 /core/debugger/script_debugger.cpp | |
parent | 5046f666a1181675b39f156c38346525dc1c444e (diff) | |
parent | 0ee0fa42e6639b6fa474b7cf6afc6b1a78142185 (diff) | |
download | redot-engine-00949f0c5fcc6a4f8382a4a97d5591fd9ec380f8.tar.gz |
Merge pull request #38738 from akien-mga/cause-we-never-go-out-of-style
Style: Remove new line at block start, enforce line between functions, enforce braces in if and loop blocks
Diffstat (limited to 'core/debugger/script_debugger.cpp')
-rw-r--r-- | core/debugger/script_debugger.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/core/debugger/script_debugger.cpp b/core/debugger/script_debugger.cpp index 935ad01d80..0cd3238efb 100644 --- a/core/debugger/script_debugger.cpp +++ b/core/debugger/script_debugger.cpp @@ -33,69 +33,63 @@ #include "core/debugger/engine_debugger.h" void ScriptDebugger::set_lines_left(int p_left) { - lines_left = p_left; } int ScriptDebugger::get_lines_left() const { - return lines_left; } void ScriptDebugger::set_depth(int p_depth) { - depth = p_depth; } int ScriptDebugger::get_depth() const { - return depth; } void ScriptDebugger::insert_breakpoint(int p_line, const StringName &p_source) { - - if (!breakpoints.has(p_line)) + if (!breakpoints.has(p_line)) { breakpoints[p_line] = Set<StringName>(); + } breakpoints[p_line].insert(p_source); } void ScriptDebugger::remove_breakpoint(int p_line, const StringName &p_source) { - - if (!breakpoints.has(p_line)) + if (!breakpoints.has(p_line)) { return; + } breakpoints[p_line].erase(p_source); - if (breakpoints[p_line].size() == 0) + if (breakpoints[p_line].size() == 0) { breakpoints.erase(p_line); + } } -bool ScriptDebugger::is_breakpoint(int p_line, const StringName &p_source) const { - if (!breakpoints.has(p_line)) +bool ScriptDebugger::is_breakpoint(int p_line, const StringName &p_source) const { + if (!breakpoints.has(p_line)) { return false; + } return breakpoints[p_line].has(p_source); } -bool ScriptDebugger::is_breakpoint_line(int p_line) const { +bool ScriptDebugger::is_breakpoint_line(int p_line) const { return breakpoints.has(p_line); } String ScriptDebugger::breakpoint_find_source(const String &p_source) const { - return p_source; } void ScriptDebugger::clear_breakpoints() { - breakpoints.clear(); } void ScriptDebugger::set_skip_breakpoints(bool p_skip_breakpoints) { - skip_breakpoints = p_skip_breakpoints; } bool ScriptDebugger::is_skipping_breakpoints() { - return skip_breakpoints; } @@ -118,6 +112,5 @@ Vector<ScriptLanguage::StackInfo> ScriptDebugger::get_error_stack_info() const { } ScriptLanguage *ScriptDebugger::get_break_language() const { - return break_lang; } |