1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

Add -Wshadow=local to warnings and fix reported issues.

Fixes #25316.
This commit is contained in:
marxin
2019-02-12 21:10:08 +01:00
committed by Rémi Verschelde
parent 132e2f458d
commit 8d51618949
134 changed files with 1107 additions and 1110 deletions

View File

@@ -905,8 +905,8 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
List<StringName> inheritors;
ClassDB::get_inheriters_from_class(base.strip_edges(), &inheritors);
for (int i = 0; i < custom_resources.size(); i++) {
inheritors.push_back(custom_resources[i].name);
for (int j = 0; j < custom_resources.size(); j++) {
inheritors.push_back(custom_resources[j].name);
}
List<StringName>::Element *E = inheritors.front();
@@ -915,17 +915,17 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
E = E->next();
}
for (Set<String>::Element *E = valid_inheritors.front(); E; E = E->next()) {
String t = E->get();
for (Set<String>::Element *j = valid_inheritors.front(); j; j = j->next()) {
String t = j->get();
bool is_custom_resource = false;
Ref<Texture> icon;
if (!custom_resources.empty()) {
for (int i = 0; i < custom_resources.size(); i++) {
if (custom_resources[i].name == t) {
for (int k = 0; k < custom_resources.size(); k++) {
if (custom_resources[k].name == t) {
is_custom_resource = true;
if (custom_resources[i].icon.is_valid())
icon = custom_resources[i].icon;
if (custom_resources[k].icon.is_valid())
icon = custom_resources[k].icon;
break;
}
}