mutation_partition: make for_each_cell() accessible outside source file
for_each_cell() const already can be used from any place in the code, allow the same with non-const version.
This commit is contained in:
@@ -1019,19 +1019,6 @@ void row::for_each_cell(Func&& func, Rollback&& rollback) {
|
||||
}
|
||||
}
|
||||
|
||||
template<typename Func>
|
||||
void row::for_each_cell(Func&& func) {
|
||||
if (_type == storage_type::vector) {
|
||||
for (auto i : bitsets::for_each_set(_storage.vector.present)) {
|
||||
func(i, _storage.vector.v[i]);
|
||||
}
|
||||
} else {
|
||||
for (auto& cell : _storage.set) {
|
||||
func(cell.id(), cell.cell());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
row::apply_reversibly(const column_definition& column, atomic_cell_or_collection& value) {
|
||||
static_assert(std::is_nothrow_move_constructible<atomic_cell_or_collection>::value
|
||||
|
||||
@@ -194,7 +194,17 @@ public:
|
||||
// Calls Func(column_id, atomic_cell_or_collection&) for each cell in this row.
|
||||
// noexcept if Func doesn't throw.
|
||||
template<typename Func>
|
||||
void for_each_cell(Func&&);
|
||||
void for_each_cell(Func&& func) {
|
||||
if (_type == storage_type::vector) {
|
||||
for (auto i : bitsets::for_each_set(_storage.vector.present)) {
|
||||
func(i, _storage.vector.v[i]);
|
||||
}
|
||||
} else {
|
||||
for (auto& cell : _storage.set) {
|
||||
func(cell.id(), cell.cell());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<typename Func>
|
||||
void for_each_cell(Func&& func) const {
|
||||
|
||||
Reference in New Issue
Block a user