diff options
Diffstat (limited to 'core/debugger/script_debugger.cpp')
-rw-r--r-- | core/debugger/script_debugger.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/debugger/script_debugger.cpp b/core/debugger/script_debugger.cpp index 179745b11e..0cd3238efb 100644 --- a/core/debugger/script_debugger.cpp +++ b/core/debugger/script_debugger.cpp @@ -49,23 +49,27 @@ int ScriptDebugger::get_depth() const { } 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)) + if (!breakpoints.has(p_line)) { return false; + } return breakpoints[p_line].has(p_source); } |