summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-07-16 20:46:41 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-07-16 20:46:41 +0200
commit1361d7d36aca930f621ac1f5a68aae515eb6a28d (patch)
treebe2e2e4e33ad54b5487627309c2d60a71da53e92 /test
parent339291fc674e6c021b1a1ae4aa63c6c4c73c5569 (diff)
remove last <memory> usages
Diffstat (limited to 'test')
-rw-r--r--test/hash.cpp4
-rw-r--r--test/json.cpp1
2 files changed, 2 insertions, 3 deletions
diff --git a/test/hash.cpp b/test/hash.cpp
index 2c6a7516..7582db43 100644
--- a/test/hash.cpp
+++ b/test/hash.cpp
@@ -4,8 +4,8 @@
#include "src/global-coords.hpp"
#include "src/world.hpp"
#include <cr/StringView.h>
+#include <cr/Pointer.h>
#include <bitset>
-#include <memory>
#include <mg/Functions.h>
#ifdef __GNUG__
@@ -49,7 +49,7 @@ template<int16_t CoordMax, int8_t ZMax, uint32_t MaxCollisions>
constexpr size_t Iters = (CoordMax*2 + 1)*(CoordMax*2 + 1)*(1+ZMax); // NOLINT(*-implicit-widening-of-multiplication-result)
constexpr size_t BucketCount = Math::max(world::initial_capacity, size_t(Math::ceil(Iters / 0.2f)));
uint32_t num_collisions = 0, iters = 0;
- auto bitset_ = std::make_unique<std::bitset<BucketCount>>(false);
+ auto bitset_ = Pointer<std::bitset<BucketCount>>{InPlace, false};
auto& bitset = *bitset_;
for (int16_t j = -CoordMax; j <= CoordMax; j++)
diff --git a/test/json.cpp b/test/json.cpp
index e9ed166f..c075d99c 100644
--- a/test/json.cpp
+++ b/test/json.cpp
@@ -9,7 +9,6 @@
#include "src/world.hpp"
#include "loader/loader.hpp"
#include "loader/wall-cell.hpp"
-#include <memory>
#include <Corrade/Containers/StringView.h>
#include <Corrade/Utility/Path.h>