diff options
author | Lightning_A <aaronjrecord@gmail.com> | 2021-08-09 14:13:42 -0600 |
---|---|---|
committer | Lightning_A <aaronjrecord@gmail.com> | 2021-09-30 15:09:12 -0600 |
commit | c63b18507d21b8a213c073bced9057b571cdcd7a (patch) | |
tree | 96b8f7532ae5d923b75bfbac8d6763015b6646bb /servers/rendering/rendering_device_binds.h | |
parent | e4dfa69bcf58e4d50acdde32c590364e43fce3ab (diff) |
Use range iterators for `Map`
Diffstat (limited to 'servers/rendering/rendering_device_binds.h')
-rw-r--r-- | servers/rendering/rendering_device_binds.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/servers/rendering/rendering_device_binds.h b/servers/rendering/rendering_device_binds.h index ccc3e2fb39..da614877c4 100644 --- a/servers/rendering/rendering_device_binds.h +++ b/servers/rendering/rendering_device_binds.h @@ -351,8 +351,8 @@ public: Vector<StringName> get_version_list() const { Vector<StringName> vnames; - for (Map<StringName, Ref<RDShaderSPIRV>>::Element *E = versions.front(); E; E = E->next()) { - vnames.push_back(E->key()); + for (const KeyValue<StringName, Ref<RDShaderSPIRV>> &E : versions) { + vnames.push_back(E.key); } vnames.sort_custom<StringName::AlphCompare>(); return vnames; @@ -371,9 +371,9 @@ public: if (base_error != "") { ERR_PRINT("Error parsing shader '" + p_file + "':\n\n" + base_error); } else { - for (Map<StringName, Ref<RDShaderSPIRV>>::Element *E = versions.front(); E; E = E->next()) { + for (KeyValue<StringName, Ref<RDShaderSPIRV>> &E : versions) { for (int i = 0; i < RD::SHADER_STAGE_MAX; i++) { - String error = E->get()->get_stage_compile_error(RD::ShaderStage(i)); + String error = E.value->get_stage_compile_error(RD::ShaderStage(i)); if (error != String()) { static const char *stage_str[RD::SHADER_STAGE_MAX] = { "vertex", @@ -383,7 +383,7 @@ public: "compute" }; - ERR_PRINT("Error parsing shader '" + p_file + "', version '" + String(E->key()) + "', stage '" + stage_str[i] + "':\n\n" + error); + ERR_PRINT("Error parsing shader '" + p_file + "', version '" + String(E.key) + "', stage '" + stage_str[i] + "':\n\n" + error); } } } |