From 8d51618949d5ea8a94e0f504401e8f852a393968 Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 12 Feb 2019 21:10:08 +0100 Subject: Add -Wshadow=local to warnings and fix reported issues. Fixes #25316. --- core/variant_call.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'core/variant_call.cpp') diff --git a/core/variant_call.cpp b/core/variant_call.cpp index f6f4569dfa..32461f6584 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -1227,15 +1227,15 @@ bool Variant::has_method(const StringName &p_method) const { #endif } - const _VariantCall::TypeFunc &fd = _VariantCall::type_funcs[type]; - return fd.functions.has(p_method); + const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[type]; + return tf.functions.has(p_method); } Vector Variant::get_method_argument_types(Variant::Type p_type, const StringName &p_method) { - const _VariantCall::TypeFunc &fd = _VariantCall::type_funcs[p_type]; + const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[p_type]; - const Map::Element *E = fd.functions.find(p_method); + const Map::Element *E = tf.functions.find(p_method); if (!E) return Vector(); @@ -1244,9 +1244,9 @@ Vector Variant::get_method_argument_types(Variant::Type p_type, c bool Variant::is_method_const(Variant::Type p_type, const StringName &p_method) { - const _VariantCall::TypeFunc &fd = _VariantCall::type_funcs[p_type]; + const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[p_type]; - const Map::Element *E = fd.functions.find(p_method); + const Map::Element *E = tf.functions.find(p_method); if (!E) return false; @@ -1255,9 +1255,9 @@ bool Variant::is_method_const(Variant::Type p_type, const StringName &p_method) Vector Variant::get_method_argument_names(Variant::Type p_type, const StringName &p_method) { - const _VariantCall::TypeFunc &fd = _VariantCall::type_funcs[p_type]; + const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[p_type]; - const Map::Element *E = fd.functions.find(p_method); + const Map::Element *E = tf.functions.find(p_method); if (!E) return Vector(); @@ -1266,9 +1266,9 @@ Vector Variant::get_method_argument_names(Variant::Type p_type, cons Variant::Type Variant::get_method_return_type(Variant::Type p_type, const StringName &p_method, bool *r_has_return) { - const _VariantCall::TypeFunc &fd = _VariantCall::type_funcs[p_type]; + const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[p_type]; - const Map::Element *E = fd.functions.find(p_method); + const Map::Element *E = tf.functions.find(p_method); if (!E) return Variant::NIL; @@ -1280,9 +1280,9 @@ Variant::Type Variant::get_method_return_type(Variant::Type p_type, const String Vector Variant::get_method_default_arguments(Variant::Type p_type, const StringName &p_method) { - const _VariantCall::TypeFunc &fd = _VariantCall::type_funcs[p_type]; + const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[p_type]; - const Map::Element *E = fd.functions.find(p_method); + const Map::Element *E = tf.functions.find(p_method); if (!E) return Vector(); @@ -1291,9 +1291,9 @@ Vector Variant::get_method_default_arguments(Variant::Type p_type, cons void Variant::get_method_list(List *p_list) const { - const _VariantCall::TypeFunc &fd = _VariantCall::type_funcs[type]; + const _VariantCall::TypeFunc &tf = _VariantCall::type_funcs[type]; - for (const Map::Element *E = fd.functions.front(); E; E = E->next()) { + for (const Map::Element *E = tf.functions.front(); E; E = E->next()) { const _VariantCall::FuncData &fd = E->get(); @@ -1405,11 +1405,11 @@ Variant Variant::get_constant_value(Variant::Type p_type, const StringName &p_va Map::Element *E = cd.value.find(p_value); if (!E) { - Map::Element *E = cd.variant_value.find(p_value); - if (E) { + Map::Element *F = cd.variant_value.find(p_value); + if (F) { if (r_valid) *r_valid = true; - return E->get(); + return F->get(); } else { return -1; } -- cgit v1.2.3