collection_type_impl: Make for_each_cell static
Signed-off-by: Duarte Nunes <duarte@scylladb.com> Message-Id: <20180115013532.67200-1-duarte@scylladb.com>
This commit is contained in:
@@ -280,7 +280,7 @@ row_marker view_updates::compute_row_marker(const clustering_row& base_row) cons
|
||||
if (def.is_atomic()) {
|
||||
maybe_update_expiry_and_ttl(c.as_atomic_cell());
|
||||
} else {
|
||||
static_pointer_cast<const collection_type_impl>(def.type)->for_each_cell(c.as_collection_mutation(), maybe_update_expiry_and_ttl);
|
||||
collection_type_impl::for_each_cell(c.as_collection_mutation(), maybe_update_expiry_and_ttl);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -374,7 +374,7 @@ void view_updates::do_delete_old_entry(const partition_key& base_key, const clus
|
||||
if (def->is_atomic()) {
|
||||
set_max_ts(cell.as_atomic_cell());
|
||||
} else {
|
||||
static_pointer_cast<const collection_type_impl>(def->type)->for_each_cell(cell.as_collection_mutation(), set_max_ts);
|
||||
collection_type_impl::for_each_cell(cell.as_collection_mutation(), set_max_ts);
|
||||
}
|
||||
});
|
||||
get_view_row(base_key, existing).apply(shadowable_tombstone(ts, now));
|
||||
|
||||
2
types.hh
2
types.hh
@@ -824,7 +824,7 @@ public:
|
||||
// Calls Func(atomic_cell_view) for each cell in this collection.
|
||||
// noexcept if Func doesn't throw.
|
||||
template<typename Func>
|
||||
void for_each_cell(collection_mutation_view c, Func&& func) const {
|
||||
static void for_each_cell(collection_mutation_view c, Func&& func) {
|
||||
auto m_view = deserialize_mutation_form(std::move(c));
|
||||
for (auto&& c : m_view.cells) {
|
||||
func(std::move(c.second));
|
||||
|
||||
Reference in New Issue
Block a user