@@ -1858,21 +1858,19 @@ class raw_hash_set
1858
1858
1859
1859
template <class K = key_type>
1860
1860
bool find_impl (const key_arg<K>& PHMAP_RESTRICT key, size_t hashval, size_t & PHMAP_RESTRICT offset) {
1861
- auto ctrl_ptr = ctrl_;
1862
1861
PHMAP_IF_CONSTEXPR (!std_alloc_t ::value) {
1863
1862
// ctrl_ could be nullptr
1864
- if (!ctrl_ptr )
1863
+ if (!ctrl_ )
1865
1864
return false ;
1866
1865
}
1867
1866
auto seq = probe (hashval);
1868
- auto slots_ptr = slots_;
1869
1867
while (true ) {
1870
- Group g{ ctrl_ptr + seq.offset () };
1868
+ Group g{ ctrl_ + seq.offset () };
1871
1869
for (uint32_t i : g.Match ((h2_t )H2 (hashval))) {
1872
1870
offset = seq.offset ((size_t )i);
1873
1871
if (PHMAP_PREDICT_TRUE (PolicyTraits::apply (
1874
1872
EqualElement<K>{key, eq_ref ()},
1875
- PolicyTraits::element (slots_ptr + offset))))
1873
+ PolicyTraits::element (slots_ + offset))))
1876
1874
return true ;
1877
1875
}
1878
1876
if (PHMAP_PREDICT_TRUE (g.MatchEmpty ()))
@@ -2036,11 +2034,9 @@ class raw_hash_set
2036
2034
std::is_same<typename Policy::is_flat, std::false_type>::value)) {
2037
2035
// node map, or not trivially destructible... we need to iterate and destroy values one by one
2038
2036
// std::cout << "either this is a node map or " << type_name<typename PolicyTraits::value_type>() << " is not trivially_destructible\n";
2039
- auto slots_ptr = slots_;
2040
- auto ctrl_ptr = ctrl_;
2041
2037
for (size_t i = 0 , cnt = capacity_; i != cnt; ++i) {
2042
- if (IsFull (ctrl_ptr [i])) {
2043
- PolicyTraits::destroy (&alloc_ref (), slots_ptr + i);
2038
+ if (IsFull (ctrl_ [i])) {
2039
+ PolicyTraits::destroy (&alloc_ref (), slots_ + i);
2044
2040
}
2045
2041
}
2046
2042
}
@@ -2225,20 +2221,18 @@ class raw_hash_set
2225
2221
protected:
2226
2222
template <class K >
2227
2223
size_t _find_key (const K& PHMAP_RESTRICT key, size_t hashval) {
2228
- auto ctrl_ptr = ctrl_;
2229
2224
PHMAP_IF_CONSTEXPR (!std_alloc_t ::value) {
2230
2225
// ctrl_ could be nullptr
2231
- if (!ctrl_ptr )
2226
+ if (!ctrl_ )
2232
2227
return (size_t )-1 ;
2233
2228
}
2234
2229
auto seq = probe (hashval);
2235
- auto slots_ptr = slots_;
2236
2230
while (true ) {
2237
- Group g{ctrl_ptr + seq.offset ()};
2231
+ Group g{ctrl_ + seq.offset ()};
2238
2232
for (uint32_t i : g.Match ((h2_t )H2 (hashval))) {
2239
2233
if (PHMAP_PREDICT_TRUE (PolicyTraits::apply (
2240
2234
EqualElement<K>{key, eq_ref ()},
2241
- PolicyTraits::element (slots_ptr + seq.offset ((size_t )i)))))
2235
+ PolicyTraits::element (slots_ + seq.offset ((size_t )i)))))
2242
2236
return seq.offset ((size_t )i);
2243
2237
}
2244
2238
if (PHMAP_PREDICT_TRUE (g.MatchEmpty ())) break ;
0 commit comments