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/gridmap/grid_map.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/gridmap') diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index 05ce2b6147..de50e9ea1e 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -157,13 +157,13 @@ uint32_t GridMap::get_collision_mask() const { void GridMap::set_collision_layer_value(int p_layer_number, bool p_value) { ERR_FAIL_COND_MSG(p_layer_number < 1, "Collision layer number must be between 1 and 32 inclusive."); ERR_FAIL_COND_MSG(p_layer_number > 32, "Collision layer number must be between 1 and 32 inclusive."); - uint32_t collision_layer = get_collision_layer(); + uint32_t collision_layer_new = get_collision_layer(); if (p_value) { - collision_layer |= 1 << (p_layer_number - 1); + collision_layer_new |= 1 << (p_layer_number - 1); } else { - collision_layer &= ~(1 << (p_layer_number - 1)); + collision_layer_new &= ~(1 << (p_layer_number - 1)); } - set_collision_layer(collision_layer); + set_collision_layer(collision_layer_new); } bool GridMap::get_collision_layer_value(int p_layer_number) const { -- cgit v1.2.3