diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-11-06 19:49:09 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-11-06 20:08:25 +0300 |
commit | 16732def37c5a66f3ea28dbe247b09cc6bca6677 (patch) | |
tree | 5d14f5c920a1411e336bd80b12becbb3f73de19a /source/blender/bmesh/tests/bmesh_core_test.cc | |
parent | 88926375a0e4e45f72c87b9e487c060ddd3c9216 (diff) |
Cleanup: Clang-Tidy modernize-use-nullptr
Replace `NULL` with `nullptr` in C++ code.
No functional changes.
Diffstat (limited to 'source/blender/bmesh/tests/bmesh_core_test.cc')
-rw-r--r-- | source/blender/bmesh/tests/bmesh_core_test.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/bmesh/tests/bmesh_core_test.cc b/source/blender/bmesh/tests/bmesh_core_test.cc index afbc11e0722..202d16b09e3 100644 --- a/source/blender/bmesh/tests/bmesh_core_test.cc +++ b/source/blender/bmesh/tests/bmesh_core_test.cc @@ -16,8 +16,8 @@ TEST(bmesh_core, BMVertCreate) EXPECT_EQ(bm->totvert, 0); /* make a custom layer so we can see if it is copied properly */ BM_data_layer_add(bm, &bm->vdata, CD_PROP_FLOAT); - bv1 = BM_vert_create(bm, co1, NULL, BM_CREATE_NOP); - ASSERT_TRUE(bv1 != NULL); + bv1 = BM_vert_create(bm, co1, nullptr, BM_CREATE_NOP); + ASSERT_TRUE(bv1 != nullptr); EXPECT_EQ(bv1->co[0], 1.0f); EXPECT_EQ(bv1->co[1], 2.0f); EXPECT_EQ(bv1->co[2], 0.0f); @@ -25,14 +25,14 @@ TEST(bmesh_core, BMVertCreate) EXPECT_EQ(bv1->head.htype, (char)BM_VERT); EXPECT_EQ(bv1->head.hflag, 0); EXPECT_EQ(bv1->head.api_flag, 0); - bv2 = BM_vert_create(bm, NULL, NULL, BM_CREATE_NOP); - ASSERT_TRUE(bv2 != NULL); + bv2 = BM_vert_create(bm, nullptr, nullptr, BM_CREATE_NOP); + ASSERT_TRUE(bv2 != nullptr); EXPECT_TRUE(is_zero_v3(bv2->co)); /* create with example should copy custom data but not select flag */ BM_vert_select_set(bm, bv2, true); BM_elem_float_data_set(&bm->vdata, bv2, CD_PROP_FLOAT, 1.5f); bv3 = BM_vert_create(bm, co1, bv2, BM_CREATE_NOP); - ASSERT_TRUE(bv3 != NULL); + ASSERT_TRUE(bv3 != nullptr); EXPECT_FALSE(BM_elem_flag_test((BMElem *)bv3, BM_ELEM_SELECT)); EXPECT_EQ(BM_elem_float_data_get(&bm->vdata, bv3, CD_PROP_FLOAT), 1.5f); EXPECT_EQ(BM_mesh_elem_count(bm, BM_VERT), 3); |