summaryrefslogtreecommitdiff
path: root/core/debugger/local_debugger.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-07-24 14:21:06 +0200
committerGitHub <noreply@github.com>2021-07-24 14:21:06 +0200
commit96d7bc62af25b85b8b9cc091eeea1e7a784ba624 (patch)
tree83d8a70c911fe7f8d20080a1395d195eb8370d05 /core/debugger/local_debugger.cpp
parent9ac27b58c53b50b5c7085a8fdee653e9eff159d1 (diff)
parent4e6efd1b07f1c6d53d226977ddc729333b74306a (diff)
Merge pull request #50511 from aaronfranke/iterators
Use C++ range iterators for Lists in many situations
Diffstat (limited to 'core/debugger/local_debugger.cpp')
-rw-r--r--core/debugger/local_debugger.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/debugger/local_debugger.cpp b/core/debugger/local_debugger.cpp
index ab368471e4..24833711d5 100644
--- a/core/debugger/local_debugger.cpp
+++ b/core/debugger/local_debugger.cpp
@@ -320,13 +320,13 @@ void LocalDebugger::print_variables(const List<String> &names, const List<Varian
String value;
Vector<String> value_lines;
const List<Variant>::Element *V = values.front();
- for (const List<String>::Element *E = names.front(); E; E = E->next()) {
+ for (const String &E : names) {
value = String(V->get());
if (variable_prefix.is_empty()) {
- print_line(E->get() + ": " + String(V->get()));
+ print_line(E + ": " + String(V->get()));
} else {
- print_line(E->get() + ":");
+ print_line(E + ":");
value_lines = value.split("\n");
for (int i = 0; i < value_lines.size(); ++i) {
print_line(variable_prefix + value_lines[i]);