diff options
Diffstat (limited to 'source/blender/blenlib/tests/BLI_vector_test.cc')
-rw-r--r-- | source/blender/blenlib/tests/BLI_vector_test.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenlib/tests/BLI_vector_test.cc b/source/blender/blenlib/tests/BLI_vector_test.cc index e6b2e7c6365..462f13c15ab 100644 --- a/source/blender/blenlib/tests/BLI_vector_test.cc +++ b/source/blender/blenlib/tests/BLI_vector_test.cc @@ -79,11 +79,11 @@ struct TestListValue { TEST(vector, ListBaseConstructor) { - TestListValue *value1 = new TestListValue{0, 0, 4}; - TestListValue *value2 = new TestListValue{0, 0, 5}; - TestListValue *value3 = new TestListValue{0, 0, 6}; + TestListValue *value1 = new TestListValue{nullptr, nullptr, 4}; + TestListValue *value2 = new TestListValue{nullptr, nullptr, 5}; + TestListValue *value3 = new TestListValue{nullptr, nullptr, 6}; - ListBase list = {NULL, NULL}; + ListBase list = {nullptr, nullptr}; BLI_addtail(&list, value1); BLI_addtail(&list, value2); BLI_addtail(&list, value3); @@ -456,10 +456,10 @@ TEST(vector, AppendNTimes) TEST(vector, UniquePtrValue) { Vector<std::unique_ptr<int>> vec; - vec.append(std::unique_ptr<int>(new int())); - vec.append(std::unique_ptr<int>(new int())); - vec.append(std::unique_ptr<int>(new int())); - vec.append(std::unique_ptr<int>(new int())); + vec.append(std::make_unique<int>()); + vec.append(std::make_unique<int>()); + vec.append(std::make_unique<int>()); + vec.append(std::make_unique<int>()); EXPECT_EQ(vec.size(), 4); std::unique_ptr<int> &a = vec.last(); |