diff options
Diffstat (limited to 'editor/debugger/debug_adapter/debug_adapter_parser.cpp')
-rw-r--r-- | editor/debugger/debug_adapter/debug_adapter_parser.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/editor/debugger/debug_adapter/debug_adapter_parser.cpp b/editor/debugger/debug_adapter/debug_adapter_parser.cpp index b75e5c1c0d..4210baeed2 100644 --- a/editor/debugger/debug_adapter/debug_adapter_parser.cpp +++ b/editor/debugger/debug_adapter/debug_adapter_parser.cpp @@ -358,7 +358,7 @@ Dictionary DebugAdapterParser::req_setBreakpoints(const Dictionary &p_params) co } // If path contains \, it's a Windows path, so we need to convert it to /, and make the drive letter uppercase - if (source.path.find("\\") != -1) { + if (source.path.contains("\\")) { source.path = source.path.replace("\\", "/"); source.path = source.path.substr(0, 1).to_upper() + source.path.substr(1); } @@ -407,9 +407,10 @@ Dictionary DebugAdapterParser::req_scopes(const Dictionary &p_params) const { HashMap<DAP::StackFrame, List<int>, DAP::StackFrame>::Iterator E = DebugAdapterProtocol::get_singleton()->stackframe_list.find(frame); if (E) { ERR_FAIL_COND_V(E->value.size() != 3, prepare_error_response(p_params, DAP::ErrorType::UNKNOWN)); - for (int i = 0; i < 3; i++) { + List<int>::ConstIterator itr = E->value.begin(); + for (int i = 0; i < 3; ++itr, ++i) { DAP::Scope scope; - scope.variablesReference = E->value[i]; + scope.variablesReference = *itr; switch (i) { case 0: scope.name = "Locals"; |