Skip to content

Commit

Permalink
fix missing virtual dtor on observable_reader_node
Browse files Browse the repository at this point in the history
This commit fixes an issue where the observable_reader_node, which serve
as a base class for reader_node, didn't have a virtual dtor.

This was made easier to miss in virtue of observable_reader_node not
having any virtual method.

By having observable_reader_node derive from reader_node_base, we
effectively fix the issue and by removing multiple inheritance.
observable_reader_node now inherits its virtual dtor from
reader_node_base.
  • Loading branch information
TheCoconutChef committed Sep 18, 2024
1 parent 62aed89 commit e6dd1e2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lager/detail/nodes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ struct notifying_guard_t
* Interface for nodes capable of notifying observers.
*/
template <typename T>
class observable_reader_node
class observable_reader_node : public reader_node_base
{
public:
using value_type = T;
Expand Down Expand Up @@ -186,9 +186,7 @@ class observable_reader_node
* functionality for setting values and propagating them to children.
*/
template <typename T>
class reader_node
: public reader_node_base
, public observable_reader_node<T>
class reader_node : public observable_reader_node<T>
{
public:
using value_type = typename observable_reader_node<T>::value_type;
Expand Down

0 comments on commit e6dd1e2

Please sign in to comment.