diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-09-29 12:53:28 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-10-07 11:32:33 +0300 |
commit | 0103af1ddda6a2aa31227965141dd7d3a513e081 (patch) | |
tree | b0965bb65919bc1495ee02204a91e5ed3a9b56a7 /core/variant | |
parent | 5b7f62af55b7f322192f95258d825b163cbf9dc1 (diff) |
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4.
Diffstat (limited to 'core/variant')
-rw-r--r-- | core/variant/callable.cpp | 24 | ||||
-rw-r--r-- | core/variant/variant.cpp | 4 |
2 files changed, 12 insertions, 16 deletions
diff --git a/core/variant/callable.cpp b/core/variant/callable.cpp index b35e2f004b..79532d9aca 100644 --- a/core/variant/callable.cpp +++ b/core/variant/callable.cpp @@ -402,33 +402,33 @@ Error Signal::emit(const Variant **p_arguments, int p_argcount) const { } Error Signal::connect(const Callable &p_callable, uint32_t p_flags) { - Object *object = get_object(); - ERR_FAIL_COND_V(!object, ERR_UNCONFIGURED); + Object *obj = get_object(); + ERR_FAIL_COND_V(!obj, ERR_UNCONFIGURED); - return object->connect(name, p_callable, p_flags); + return obj->connect(name, p_callable, p_flags); } void Signal::disconnect(const Callable &p_callable) { - Object *object = get_object(); - ERR_FAIL_COND(!object); - object->disconnect(name, p_callable); + Object *obj = get_object(); + ERR_FAIL_COND(!obj); + obj->disconnect(name, p_callable); } bool Signal::is_connected(const Callable &p_callable) const { - Object *object = get_object(); - ERR_FAIL_COND_V(!object, false); + Object *obj = get_object(); + ERR_FAIL_COND_V(!obj, false); - return object->is_connected(name, p_callable); + return obj->is_connected(name, p_callable); } Array Signal::get_connections() const { - Object *object = get_object(); - if (!object) { + Object *obj = get_object(); + if (!obj) { return Array(); } List<Object::Connection> connections; - object->get_signal_connection_list(name, &connections); + obj->get_signal_connection_list(name, &connections); Array arr; for (const Object::Connection &E : connections) { diff --git a/core/variant/variant.cpp b/core/variant/variant.cpp index a6e91bf2ac..fbce337359 100644 --- a/core/variant/variant.cpp +++ b/core/variant/variant.cpp @@ -1101,8 +1101,6 @@ bool Variant::is_one() const { return !is_zero(); } } - - return false; } bool Variant::is_null() const { @@ -3573,8 +3571,6 @@ bool Variant::hash_compare(const Variant &p_variant, int recursion_count) const evaluate(OP_EQUAL, *this, p_variant, r, v); return r; } - - return false; } bool Variant::is_ref_counted() const { |