diff --git a/deps/ox/src/ox/std/smallmap.hpp b/deps/ox/src/ox/std/smallmap.hpp index 27f16927..66871cf3 100644 --- a/deps/ox/src/ox/std/smallmap.hpp +++ b/deps/ox/src/ox/std/smallmap.hpp @@ -39,8 +39,6 @@ class SmallMap { constexpr SmallMap(SmallMap &&other) noexcept; - constexpr ~SmallMap(); - constexpr bool operator==(SmallMap const&other) const; constexpr SmallMap &operator=(SmallMap const&other); @@ -105,11 +103,6 @@ constexpr SmallMap::SmallMap(SmallMap &&other) noe m_pairs = std::move(other.m_pairs); } -template -constexpr SmallMap::~SmallMap() { - clear(); -} - template constexpr bool SmallMap::operator==(SmallMap const&other) const { return m_pairs == other.m_pairs; diff --git a/deps/ox/src/ox/std/test/tests.cpp b/deps/ox/src/ox/std/test/tests.cpp index e0ad7165..1a470b23 100644 --- a/deps/ox/src/ox/std/test/tests.cpp +++ b/deps/ox/src/ox/std/test/tests.cpp @@ -18,12 +18,12 @@ #include [[nodiscard]] -static uint64_t nowMs() { +static uint64_t steadyNowMs() { #if __has_include() using namespace std::chrono; return static_cast( duration_cast( - system_clock::now().time_since_epoch()).count()); + steady_clock::now().time_since_epoch()).count()); #else return 0; #endif @@ -41,13 +41,13 @@ uint64_t timeMapStrToUuid(int elemCnt, int lookups, uint64_t seed = 4321) noexce auto const keys = map.keys(); ox::Random rand; // start - auto const startTime = nowMs(); + auto const startTime = steadyNowMs(); for (int i = 0; i < lookups; ++i) { auto const&k = keys[rand.gen() % keys.size()]; map[k]; oxExpect(map[k], ox::UUID::fromString(k).unwrap()); } - return nowMs() - startTime; + return steadyNowMs() - startTime; } template> @@ -62,16 +62,16 @@ uint64_t timeMapUuidToStr(int elemCnt, int lookups, uint64_t seed = 4321) noexce auto const keys = map.keys(); ox::Random rand; // start - auto const startTime = nowMs(); + auto const startTime = steadyNowMs(); for (int i = 0; i < lookups; ++i) { auto const&k = keys[rand.gen() % keys.size()]; oxExpect(map[k], k.toString()); } - return nowMs() - startTime; + return steadyNowMs() - startTime; } static ox::Error compareMaps(int lookupCnt = 1'000'000) { - auto const seed = nowMs(); + auto const seed = steadyNowMs(); uint64_t hashTime{}; uint64_t smallTime{}; int elemCnt = 1;