Skip to content

Commit 4b19aa2

Browse files
committed
a few fixes due to update of clang-tidy to 21.1.4
1 parent 9eb6ae9 commit 4b19aa2

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.clang-tidy

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,20 @@ Checks: >-
1010
-cppcoreguidelines-macro-to-enum,
1111
-cppcoreguidelines-pro-bounds-constant-array-index,
1212
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
13+
-fuchsia-default-arguments-calls,
1314
-fuchsia-default-arguments-declarations,
1415
-fuchsia-overloaded-operator,
15-
-fuchsia-default-arguments-calls,
16-
-llvmlibc-implementation-in-namespace,
17-
-modernize-use-constraints,
1816
-fuchsia-trailing-return,
1917
-llvmlibc-callee-namespace,
18+
-llvmlibc-implementation-in-namespace,
2019
-llvmlibc-inline-function-decl,
2120
-llvmlibc-restrict-system-libc-headers,
2221
-modernize-macro-to-enum,
22+
-modernize-use-constraints,
2323
-readability-function-cognitive-complexity,
2424
-readability-identifier-length,
2525
-readability-magic-numbers,
26+
-readability-use-concise-preprocessor-directives,
2627
HeaderFilterRegex: '.*unordered_dense\.h'
2728
CheckOptions:
2829
cppcoreguidelines-avoid-do-while.IgnoreMacros: 'true'

include/ankerl/unordered_dense.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,7 +1802,7 @@ class table : public std::conditional_t<is_map_v<T>, base_table_type_map<T>, bas
18021802
bucket_idx = next(bucket_idx);
18031803
}
18041804

1805-
do_erase(bucket_idx, [](value_type const& /*unused*/) {
1805+
do_erase(bucket_idx, [](value_type const& /*unused*/) -> void {
18061806
});
18071807
return begin() + static_cast<difference_type>(value_idx_to_remove);
18081808
}
@@ -1817,7 +1817,7 @@ class table : public std::conditional_t<is_map_v<T>, base_table_type_map<T>, bas
18171817
}
18181818

18191819
auto tmp = std::optional<value_type>{};
1820-
do_erase(bucket_idx, [&tmp](value_type&& val) {
1820+
do_erase(bucket_idx, [&tmp](value_type&& val) -> void {
18211821
tmp = std::move(val);
18221822
});
18231823
return std::move(tmp).value();
@@ -1858,28 +1858,28 @@ class table : public std::conditional_t<is_map_v<T>, base_table_type_map<T>, bas
18581858
}
18591859

18601860
auto erase(Key const& key) -> std::size_t {
1861-
return do_erase_key(key, [](value_type const& /*unused*/) {
1861+
return do_erase_key(key, [](value_type const& /*unused*/) -> void {
18621862
});
18631863
}
18641864

18651865
auto extract(Key const& key) -> std::optional<value_type> {
18661866
auto tmp = std::optional<value_type>{};
1867-
do_erase_key(key, [&tmp](value_type&& val) {
1867+
do_erase_key(key, [&tmp](value_type&& val) -> void {
18681868
tmp = std::move(val);
18691869
});
18701870
return tmp;
18711871
}
18721872

18731873
template <class K, class H = Hash, class KE = KeyEqual, std::enable_if_t<is_transparent_v<H, KE>, bool> = true>
18741874
auto erase(K&& key) -> std::size_t {
1875-
return do_erase_key(std::forward<K>(key), [](value_type const& /*unused*/) {
1875+
return do_erase_key(std::forward<K>(key), [](value_type const& /*unused*/) -> void {
18761876
});
18771877
}
18781878

18791879
template <class K, class H = Hash, class KE = KeyEqual, std::enable_if_t<is_transparent_v<H, KE>, bool> = true>
18801880
auto extract(K&& key) -> std::optional<value_type> {
18811881
auto tmp = std::optional<value_type>{};
1882-
do_erase_key(std::forward<K>(key), [&tmp](value_type&& val) {
1882+
do_erase_key(std::forward<K>(key), [&tmp](value_type&& val) -> void {
18831883
tmp = std::move(val);
18841884
});
18851885
return tmp;

0 commit comments

Comments
 (0)