Skip to content

Commit

Permalink
Base Extractor classes don't need explicit destructors.
Browse files Browse the repository at this point in the history
We never call the destructor through a pointer to these base classes, so
there isn't any need to construct a vtable for them. The only vtable
that is required is for the interface's destructor, which looks for and
calls the derived class's destructor, which then automatically calls the
destructor for all of its base classes.
  • Loading branch information
LTLA committed May 15, 2024
1 parent e23c09f commit 11e7961
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions include/tatami_chunked/CustomDenseChunkedMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ struct DenseBaseSolo {
final_solo(factory.create())
{}

virtual ~DenseBaseSolo() = default;

protected:
template<typename ... Args_>
std::pair<const Slab*, Index_> fetch_raw(Index_ i, Args_&& ... args) {
Expand Down Expand Up @@ -113,8 +111,6 @@ struct DenseBaseMyopic {
cache(max_slabs_in_cache)
{}

virtual ~DenseBaseMyopic() = default;

protected:
template<typename ... Args_>
std::pair<const Slab*, Index_> fetch_raw(Index_ i, Args_&& ... args) {
Expand Down Expand Up @@ -144,8 +140,6 @@ struct DenseBaseOracular {
cache(std::move(ora), max_slabs_in_cache)
{}

virtual ~DenseBaseOracular() = default;

protected:
template<typename ... Args_>
std::pair<const Slab*, Index_> fetch_raw([[maybe_unused]] Index_ i, Args_&& ... args) {
Expand Down
6 changes: 0 additions & 6 deletions include/tatami_chunked/CustomSparseChunkedMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ struct SparseBaseSolo {
final_solo(factory.create())
{}

virtual ~SparseBaseSolo() = default;

protected:
template<typename ... Args_>
std::pair<const Slab*, Index_> fetch_raw(Index_ i, Args_&& ... args) {
Expand Down Expand Up @@ -121,8 +119,6 @@ struct SparseBaseMyopic {
cache(max_slabs_in_cache)
{}

virtual ~SparseBaseMyopic() = default;

protected:
template<typename ... Args_>
std::pair<const Slab*, Index_> fetch_raw(Index_ i, Args_&& ... args) {
Expand Down Expand Up @@ -154,8 +150,6 @@ struct SparseBaseOracular {
cache(std::move(ora), max_slabs_in_cache)
{}

virtual ~SparseBaseOracular() = default;

protected:
template<typename ... Args_>
std::pair<const Slab*, Index_> fetch_raw([[maybe_unused]] Index_ i, Args_&& ... args) {
Expand Down

0 comments on commit 11e7961

Please sign in to comment.