Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2022-01-11 22:54:18 +0300
committerRay Molenkamp <github@lazydodo.com>2022-01-11 22:54:18 +0300
commite95b4dc2ddedac3a6edc5d75e4cdac4059305f04 (patch)
treede5c7e966764f5564b653735e2c57adcc4d94fb5 /source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
parent259a71cd3c06a258d5795e1a1529db4f687dcd93 (diff)
Cleanup: Fix build warnings with MSVC
our UNUSED macro is essentially a no-op for MSVC, which lead to the situation where this well meant macro was emitting the following warning: C4189: 'UNUSED_i': local variable is initialized but not referenced However since we have been on c++17 for a while now the UNUSED macro can be replaced with the standard [[maybe_unused]] attribute in cpp files. This changes cleans up the use of the UNUSED macro in the bf_nodes_geometry project. Differential Revision: https://developer.blender.org/D12915 Reviewed by: JacquesLucke, Severin, Sergey, HooglyBoogly
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
index e90a9eb393b..5b67258a947 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
@@ -155,7 +155,7 @@ static void calculate_polys(const CuboidConfig &config,
/* Calculate polys for Bottom faces. */
int vert_1_start = 0;
- for (const int UNUSED(y) : IndexRange(config.edges_y)) {
+ for ([[maybe_unused]] const int y : IndexRange(config.edges_y)) {
for (const int x : IndexRange(config.edges_x)) {
const int vert_1 = vert_1_start + x;
const int vert_2 = vert_1_start + config.verts_x + x;
@@ -173,7 +173,7 @@ static void calculate_polys(const CuboidConfig &config,
vert_1_start = 0;
int vert_2_start = config.verts_x * config.verts_y;
- for (const int UNUSED(z) : IndexRange(config.edges_z)) {
+ for ([[maybe_unused]] const int z : IndexRange(config.edges_z)) {
for (const int x : IndexRange(config.edges_x)) {
define_quad(polys,
loops,
@@ -196,7 +196,7 @@ static void calculate_polys(const CuboidConfig &config,
(config.verts_x - 2) * (config.verts_y - 2));
vert_2_start = vert_1_start + config.verts_x;
- for (const int UNUSED(y) : IndexRange(config.edges_y)) {
+ for ([[maybe_unused]] const int y : IndexRange(config.edges_y)) {
for (const int x : IndexRange(config.edges_x)) {
define_quad(polys,
loops,