Skip to content

Commit 8d47c60

Browse files
Arthapzmartinus
authored andcommitted
fix overlooked uint8_t missing std:: and fix missing cstdint header include in module
1 parent e6dbba2 commit 8d47c60

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

include/ankerl/unordered_dense.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ inline void mum(std::uint64_t* a, std::uint64_t* b) {
214214
UINT64_C(0x8ebc6af09c88c6e3),
215215
UINT64_C(0x589965cc75374cc3)};
216216

217-
auto const* p = static_cast<uint8_t const*>(key);
217+
auto const* p = static_cast<std::uint8_t const*>(key);
218218
std::uint64_t seed = secret[0];
219219
std::uint64_t a{};
220220
std::uint64_t b{};
@@ -617,7 +617,7 @@ class segmented_vector {
617617
}
618618

619619
[[nodiscard]] constexpr auto operator-(difference_type diff) const noexcept -> iter_t {
620-
return {m_data, static_cast<size_t>(static_cast<difference_type>(m_idx) - diff)};
620+
return {m_data, static_cast<std::size_t>(static_cast<difference_type>(m_idx) - diff)};
621621
}
622622

623623
constexpr auto operator-=(difference_type diff) noexcept -> iter_t& {
@@ -703,9 +703,9 @@ class segmented_vector {
703703
return (capacity + num_elements_in_block - 1U) / num_elements_in_block;
704704
}
705705

706-
void resize_shrink(size_t new_size) {
706+
void resize_shrink(std::size_t new_size) {
707707
if constexpr (!std::is_trivially_destructible_v<T>) {
708-
for (size_t ix = new_size; ix < m_size; ++ix) {
708+
for (std::size_t ix = new_size; ix < m_size; ++ix) {
709709
operator[](ix).~T();
710710
}
711711
}
@@ -824,25 +824,25 @@ class segmented_vector {
824824
}
825825
}
826826

827-
void resize(size_t const count) {
827+
void resize(std::size_t const count) {
828828
if (count < m_size) {
829829
resize_shrink(count);
830830
} else if (count > m_size) {
831-
size_t const new_elems = count - m_size;
831+
std::size_t const new_elems = count - m_size;
832832
reserve(count);
833-
for (size_t ix = 0; ix < new_elems; ++ix) {
833+
for (std::size_t ix = 0; ix < new_elems; ++ix) {
834834
emplace_back();
835835
}
836836
}
837837
}
838838

839-
void resize(size_t const count, value_type const& value) {
839+
void resize(std::size_t const count, value_type const& value) {
840840
if (count < m_size) {
841841
resize_shrink(count);
842842
} else if (count > m_size) {
843-
size_t const new_elems = count - m_size;
843+
std::size_t const new_elems = count - m_size;
844844
reserve(count);
845-
for (size_t ix = 0; ix < new_elems; ++ix) {
845+
for (std::size_t ix = 0; ix < new_elems; ++ix) {
846846
emplace_back(value);
847847
}
848848
}

src/ankerl.unordered_dense.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module;
1111
#endif
1212

1313
#if ANKERL_UNORDERED_DENSE_STD_MODULE
14+
# include <cstdint> // for UINT64_C
1415
import std;
1516
#endif
1617

0 commit comments

Comments
 (0)