Improve clarity in operator{--,++}
This commit is contained in:
@@ -1154,9 +1154,10 @@ VersionedMap::Iterator &VersionedMap::Iterator::operator++() {
|
|||||||
const auto &entry = *impl->map->mm.base[impl->finger.backNode()].entry;
|
const auto &entry = *impl->map->mm.base[impl->finger.backNode()].entry;
|
||||||
impl->map->move<std::memory_order_acquire, true>(impl->finger,
|
impl->map->move<std::memory_order_acquire, true>(impl->finger,
|
||||||
impl->version);
|
impl->version);
|
||||||
if (impl->finger.searchPathSize() > 0) {
|
if (impl->finger.searchPathSize() == 0) {
|
||||||
materializeMutations(impl, &entry, nullptr);
|
break;
|
||||||
}
|
}
|
||||||
|
materializeMutations(impl, &entry, nullptr);
|
||||||
} while (impl->mutationCount == 0);
|
} while (impl->mutationCount == 0);
|
||||||
impl->mutationIndex = 0;
|
impl->mutationIndex = 0;
|
||||||
|
|
||||||
@@ -1208,9 +1209,10 @@ VersionedMap::Iterator &VersionedMap::Iterator::operator--() {
|
|||||||
const Entry *entry = impl->map->mm.base[impl->finger.backNode()].entry;
|
const Entry *entry = impl->map->mm.base[impl->finger.backNode()].entry;
|
||||||
impl->map->move<std::memory_order_acquire, false>(impl->finger,
|
impl->map->move<std::memory_order_acquire, false>(impl->finger,
|
||||||
impl->version);
|
impl->version);
|
||||||
if (impl->finger.searchPathSize() > 0) {
|
if (impl->finger.searchPathSize() == 0) {
|
||||||
materializeMutations(impl, nullptr, entry);
|
break;
|
||||||
}
|
}
|
||||||
|
materializeMutations(impl, nullptr, entry);
|
||||||
} while (impl->mutationCount == 0);
|
} while (impl->mutationCount == 0);
|
||||||
impl->mutationIndex = impl->mutationCount - 1;
|
impl->mutationIndex = impl->mutationCount - 1;
|
||||||
return *this;
|
return *this;
|
||||||
|
Reference in New Issue
Block a user