Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
More uses of std::make_unique.
[simgrid.git] / src / mc / sosp / PageStore_test.cpp
index b4f7ea9..99ff03a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2015-2020. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -39,7 +39,7 @@ public:
   static void new_content(void* buf, std::size_t size);
 };
 
-// static member datat initialization
+// static member data initialization
 std::size_t helper_tests::pagesize             = 0;
 std::unique_ptr<PageStore> helper_tests::store = nullptr;
 void* helper_tests::data                       = nullptr;
@@ -49,7 +49,7 @@ int helper_tests::value                        = 0;
 void helper_tests::Init()
 {
   pagesize = (size_t)getpagesize();
-  store    = std::unique_ptr<PageStore>(new simgrid::mc::PageStore(50));
+  store    = std::make_unique<simgrid::mc::PageStore>(50);
   data     = mmap(nullptr, getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
   REQUIRE(store->size() == 0);
 }