From 0103af1ddda6a2aa31227965141dd7d3a513e081 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Thu, 29 Sep 2022 12:53:28 +0300 Subject: Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. --- modules/multiplayer/scene_replication_config.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modules/multiplayer') diff --git a/modules/multiplayer/scene_replication_config.cpp b/modules/multiplayer/scene_replication_config.cpp index ae06516b7b..61fe51b6c9 100644 --- a/modules/multiplayer/scene_replication_config.cpp +++ b/modules/multiplayer/scene_replication_config.cpp @@ -34,11 +34,11 @@ #include "scene/main/node.h" bool SceneReplicationConfig::_set(const StringName &p_name, const Variant &p_value) { - String name = p_name; + String prop_name = p_name; - if (name.begins_with("properties/")) { - int idx = name.get_slicec('/', 1).to_int(); - String what = name.get_slicec('/', 2); + if (prop_name.begins_with("properties/")) { + int idx = prop_name.get_slicec('/', 1).to_int(); + String what = prop_name.get_slicec('/', 2); if (properties.size() == idx && what == "path") { ERR_FAIL_COND_V(p_value.get_type() != Variant::NODE_PATH, false); @@ -72,11 +72,11 @@ bool SceneReplicationConfig::_set(const StringName &p_name, const Variant &p_val } bool SceneReplicationConfig::_get(const StringName &p_name, Variant &r_ret) const { - String name = p_name; + String prop_name = p_name; - if (name.begins_with("properties/")) { - int idx = name.get_slicec('/', 1).to_int(); - String what = name.get_slicec('/', 2); + if (prop_name.begins_with("properties/")) { + int idx = prop_name.get_slicec('/', 1).to_int(); + String what = prop_name.get_slicec('/', 2); ERR_FAIL_INDEX_V(idx, properties.size(), false); const ReplicationProperty &prop = properties[idx]; if (what == "path") { -- cgit v1.2.3