Add virtual destructors to base classes
This commit is contained in:
@@ -190,6 +190,8 @@ struct BaseAction
|
|||||||
{
|
{
|
||||||
BaseAction(Type type_, const char *name_): m_name(name_), m_type(type_) { }
|
BaseAction(Type type_, const char *name_): m_name(name_), m_type(type_) { }
|
||||||
|
|
||||||
|
virtual ~BaseAction() { }
|
||||||
|
|
||||||
const std::string &name() const { return m_name; }
|
const std::string &name() const { return m_name; }
|
||||||
Type type() const { return m_type; }
|
Type type() const { return m_type; }
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ struct LyricsFetcher
|
|||||||
{
|
{
|
||||||
typedef std::pair<bool, std::string> Result;
|
typedef std::pair<bool, std::string> Result;
|
||||||
|
|
||||||
|
virtual ~LyricsFetcher() { }
|
||||||
|
|
||||||
virtual const char *name() const = 0;
|
virtual const char *name() const = 0;
|
||||||
virtual Result fetch(const std::string &artist, const std::string &title);
|
virtual Result fetch(const std::string &artist, const std::string &title);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user