if (LIKELY(ptc != nullptr)) {
auto& tc = *ptc;
auto count = tc.count();
- if (count + M <= HAZPTR_TC_SIZE) {
+ if ((M <= HAZPTR_TC_SIZE) && (count + M <= HAZPTR_TC_SIZE)) {
for (size_t i = 0; i < M; ++i) {
tc[count + i].hprec_ = h[i].hazptr_;
DEBUG_PRINT(i << " " << &h[i]);
h[i] = std::move(other[i]);
DEBUG_PRINT(i << " " << &h[i] << " " << &other[i]);
}
+ empty_ = other.empty_;
+ other.empty_ = true;
return *this;
}