From b607662d2e425127210e9ca2bc80a90da22b9c2f Mon Sep 17 00:00:00 2001 From: Duarte Nunes Date: Mon, 15 Jan 2018 01:35:32 +0000 Subject: [PATCH] collection_type_impl: Make for_each_cell static Signed-off-by: Duarte Nunes Message-Id: <20180115013532.67200-1-duarte@scylladb.com> --- db/view/view.cc | 4 ++-- types.hh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/db/view/view.cc b/db/view/view.cc index 125abf748c..5039d6c997 100644 --- a/db/view/view.cc +++ b/db/view/view.cc @@ -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(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(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)); diff --git a/types.hh b/types.hh index b45d267a39..b3b0b9bcfe 100644 --- a/types.hh +++ b/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 - 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));