summaryrefslogtreecommitdiff
path: root/core/io/json.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/io/json.cpp')
-rw-r--r--core/io/json.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/io/json.cpp b/core/io/json.cpp
index b3a2498212..77a6181931 100644
--- a/core/io/json.cpp
+++ b/core/io/json.cpp
@@ -121,14 +121,14 @@ String JSON::_stringify(const Variant &p_var, const String &p_indent, int p_cur_
keys.sort();
}
- for (List<Variant>::Element *E = keys.front(); E; E = E->next()) {
+ for (Variant &E : keys) {
if (E != keys.front()) {
s += ",";
s += end_statement;
}
- s += _make_indent(p_indent, p_cur_indent + 1) + _stringify(String(E->get()), p_indent, p_cur_indent + 1, p_sort_keys, p_markers);
+ s += _make_indent(p_indent, p_cur_indent + 1) + _stringify(String(E), p_indent, p_cur_indent + 1, p_sort_keys, p_markers);
s += colon;
- s += _stringify(d[E->get()], p_indent, p_cur_indent + 1, p_sort_keys, p_markers);
+ s += _stringify(d[E], p_indent, p_cur_indent + 1, p_sort_keys, p_markers);
}
s += end_statement + _make_indent(p_indent, p_cur_indent) + "}";