Action: make sure that null constructor is not used

This commit is contained in:
Felipe Zimmerle
2020-06-04 21:06:19 -03:00
committed by Felipe Zimmerle
parent c38051324d
commit 1522e7cd0a
4 changed files with 23 additions and 13 deletions

View File

@@ -17,6 +17,8 @@
#include <string>
#include <assert.h>
#endif
@@ -35,7 +37,9 @@ class Action {
Action()
: m_parserPayload(""),
m_name("")
{ }
{
assert(0);
}
explicit Action(const std::string& action)
@@ -44,9 +48,9 @@ class Action {
{ }
Action(const Action &a)
: m_parserPayload(a.m_parserPayload),
m_name(a.m_name)
Action(const Action &other)
: m_parserPayload(other.m_parserPayload),
m_name(other.m_name)
{ }
@@ -76,7 +80,7 @@ class Action {
}
const std::string *getName() const {
const std::string *getName() const noexcept {
return &m_name;
}