mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Use const references where possible for List range iterators
This commit is contained in:
parent
a0f7f42b84
commit
ac3322b0af
171 changed files with 649 additions and 650 deletions
|
|
@ -8410,7 +8410,7 @@ void RendererStorageRD::global_variables_load_settings(bool p_load_textures) {
|
|||
List<PropertyInfo> settings;
|
||||
ProjectSettings::get_singleton()->get_property_list(&settings);
|
||||
|
||||
for (PropertyInfo &E : settings) {
|
||||
for (const PropertyInfo &E : settings) {
|
||||
if (E.name.begins_with("shader_globals/")) {
|
||||
StringName name = E.name.get_slice("/", 1);
|
||||
Dictionary d = ProjectSettings::get_singleton()->get(E.name);
|
||||
|
|
@ -8581,7 +8581,7 @@ void RendererStorageRD::_update_global_variables() {
|
|||
if (global_variables.must_update_buffer_materials) {
|
||||
// only happens in the case of a buffer variable added or removed,
|
||||
// so not often.
|
||||
for (RID E : global_variables.materials_using_buffer) {
|
||||
for (const RID &E : global_variables.materials_using_buffer) {
|
||||
Material *material = material_owner.getornull(E);
|
||||
ERR_CONTINUE(!material); //wtf
|
||||
|
||||
|
|
@ -8594,7 +8594,7 @@ void RendererStorageRD::_update_global_variables() {
|
|||
if (global_variables.must_update_texture_materials) {
|
||||
// only happens in the case of a buffer variable added or removed,
|
||||
// so not often.
|
||||
for (RID E : global_variables.materials_using_texture) {
|
||||
for (const RID &E : global_variables.materials_using_texture) {
|
||||
Material *material = material_owner.getornull(E);
|
||||
ERR_CONTINUE(!material); //wtf
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue