mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Use C++ iterators for Lists in many situations
This commit is contained in:
@@ -214,8 +214,8 @@ bool Engine::has_singleton(const String &p_name) const {
|
||||
}
|
||||
|
||||
void Engine::get_singletons(List<Singleton> *p_singletons) {
|
||||
for (List<Singleton>::Element *E = singletons.front(); E; E = E->next()) {
|
||||
p_singletons->push_back(E->get());
|
||||
for (Singleton &E : singletons) {
|
||||
p_singletons->push_back(E);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user