From e0a618ed3b15255092cc07028e9895d720f7e458 Mon Sep 17 00:00:00 2001 From: Lam Pham-Sy Date: Fri, 28 Sep 2018 17:35:14 +0200 Subject: [PATCH] Buffer utest: use make_unique --- test/buffers_utest.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/buffers_utest.cpp b/test/buffers_utest.cpp index 8002eee3..301b2a7a 100644 --- a/test/buffers_utest.cpp +++ b/test/buffers_utest.cpp @@ -46,8 +46,7 @@ class BuffersTest : public ::testing::Test { T max_val = 65537; const int max = (_max == 0) ? max_val : _max; std::uniform_int_distribution dis(0, max - 1); - auto vec = - std::unique_ptr>(new vec::Buffers(n, size)); + auto vec = std::make_unique>(n, size); for (int i = 0; i < n; i++) { T* buf = quadiron::aligned_allocate(size); @@ -71,7 +70,7 @@ class BuffersTest : public ::testing::Test { } std::random_shuffle(mem.begin(), mem.end()); - auto vec = std::unique_ptr>(new vec::Vector(gf, n)); + auto vec = std::make_unique>(gf, n); for (size_t i = 0; i < n; i++) { vec->set(i, mem[i]); }