mirror of
https://github.com/godotengine/godot.git
synced 2025-10-23 09:53:25 +00:00
Use C++ iterators for Lists in many situations
This commit is contained in:
parent
b918c4c3ce
commit
4e6efd1b07
218 changed files with 2755 additions and 3004 deletions
|
@ -94,8 +94,7 @@ struct _GDFKCS {
|
|||
void GDScriptFunction::debug_get_stack_member_state(int p_line, List<Pair<StringName, int>> *r_stackvars) const {
|
||||
int oc = 0;
|
||||
Map<StringName, _GDFKC> sdmap;
|
||||
for (const List<StackDebug>::Element *E = stack_debug.front(); E; E = E->next()) {
|
||||
const StackDebug &sd = E->get();
|
||||
for (const StackDebug &sd : stack_debug) {
|
||||
if (sd.line > p_line) {
|
||||
break;
|
||||
}
|
||||
|
@ -131,10 +130,10 @@ void GDScriptFunction::debug_get_stack_member_state(int p_line, List<Pair<String
|
|||
|
||||
stackpositions.sort();
|
||||
|
||||
for (List<_GDFKCS>::Element *E = stackpositions.front(); E; E = E->next()) {
|
||||
for (_GDFKCS &E : stackpositions) {
|
||||
Pair<StringName, int> p;
|
||||
p.first = E->get().id;
|
||||
p.second = E->get().pos;
|
||||
p.first = E.id;
|
||||
p.second = E.pos;
|
||||
r_stackvars->push_back(p);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue