Skip to content

Commit

Permalink
Fix wrong cast type in listener<>::~listener()
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoureaux committed Jan 4, 2024
1 parent 25c454f commit d1f50af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ template <class _type_> void listener<_type_>::listen()
{
// If you get an error here, your listener likely doesn't inherit from the
// listener<> correctly. See the class documentation.
instances.insert(static_cast<type_t *>(this));
instances.insert(dynamic_cast<type_t *>(this));
}

/***************************************************************************
Destructor
***************************************************************************/
template <class _type_> listener<_type_>::~listener()
{
instances.erase(static_cast<type_t *>(this));
instances.erase(dynamic_cast<type_t *>(this));
}

/***************************************************************************
Expand Down

0 comments on commit d1f50af

Please sign in to comment.