[Bf-blender-cvs] [5a664c6e98c] master: Fix another implicit cast of boot to int

Sergey Sharybin noreply at git.blender.org
Mon Mar 16 12:15:19 CET 2020


Commit: 5a664c6e98ce1e3baaf0bd3cdb8316ebf3af5217
Author: Sergey Sharybin
Date:   Mon Mar 16 12:14:06 2020 +0100
Branches: master
https://developer.blender.org/rB5a664c6e98ce1e3baaf0bd3cdb8316ebf3af5217

Fix another implicit cast of boot to int

Use proper comparison to nullptr.

It is important to use nullptr since NULL is actually an integer,
which leads to another type of warnings.

===================================================================

M	tests/gtests/blenlib/BLI_polyfill_2d_test.cc

===================================================================

diff --git a/tests/gtests/blenlib/BLI_polyfill_2d_test.cc b/tests/gtests/blenlib/BLI_polyfill_2d_test.cc
index 264ed8fadbc..bb9f739a71e 100644
--- a/tests/gtests/blenlib/BLI_polyfill_2d_test.cc
+++ b/tests/gtests/blenlib/BLI_polyfill_2d_test.cc
@@ -111,7 +111,7 @@ static void test_polyfill_topology(const float poly[][2],
     const unsigned int v1 = i;
     const unsigned int v2 = (i + 1) % poly_tot;
     void **p = BLI_edgehash_lookup_p(edgehash, v1, v2);
-    EXPECT_EQ((void *)p != NULL, 1);
+    EXPECT_NE((void *)p, nullptr);
     EXPECT_EQ((intptr_t)*p, 1);
   }



More information about the Bf-blender-cvs mailing list