Use range iterators for Map

This commit is contained in:
Lightning_A 2021-08-09 14:13:42 -06:00
parent e4dfa69bcf
commit c63b18507d
154 changed files with 1897 additions and 1897 deletions

View file

@ -123,8 +123,8 @@ void EngineDebugger::iteration(uint64_t p_frame_ticks, uint64_t p_process_ticks,
physics_time = USEC_TO_SEC(p_physics_ticks);
physics_frame_time = p_physics_frame_time;
// Notify tick to running profilers
for (Map<StringName, Profiler>::Element *E = profilers.front(); E; E = E->next()) {
Profiler &p = E->get();
for (KeyValue<StringName, Profiler> &E : profilers) {
Profiler &p = E.value;
if (!p.active || !p.tick) {
continue;
}
@ -179,9 +179,9 @@ void EngineDebugger::initialize(const String &p_uri, bool p_skip_breakpoints, Ve
void EngineDebugger::deinitialize() {
if (singleton) {
// Stop all profilers
for (Map<StringName, Profiler>::Element *E = profilers.front(); E; E = E->next()) {
if (E->get().active) {
singleton->profiler_enable(E->key(), false);
for (const KeyValue<StringName, Profiler> &E : profilers) {
if (E.value.active) {
singleton->profiler_enable(E.key, false);
}
}