aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/enum_base.hpp
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2017-11-10 04:03:08 -0800
committerChris Luke <chris_luke@comcast.com>2017-11-10 13:52:30 +0000
commitbc3c12623c30cefefb974d3581179be7fb042af3 (patch)
treeb4fbfbdb825f86fc5dbecef76110ae4518f62ba0 /src/vpp-api/vom/enum_base.hpp
parent814b47b5d0877d5860375dbcdaf19252477a6722 (diff)
VOM: enum_base - not constexpr to appease coverity
Change-Id: Id87e245882eab80a85a2883ffdb7a0f3b7f26a75 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/enum_base.hpp')
-rw-r--r--src/vpp-api/vom/enum_base.hpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/vpp-api/vom/enum_base.hpp b/src/vpp-api/vom/enum_base.hpp
index 4184cebc986..6756e2498de 100644
--- a/src/vpp-api/vom/enum_base.hpp
+++ b/src/vpp-api/vom/enum_base.hpp
@@ -31,18 +31,18 @@ class enum_base
{
public:
/**
- * convert to string format for debug purposes
- */
+ * convert to string format for debug purposes
+ */
const std::string& to_string() const { return (m_desc); }
/**
- * Comparison operator
- */
+ * Comparison operator
+ */
bool operator==(const enum_base& e) const { return (e.m_value == m_value); }
/**
- * Assignment
- */
+ * Assignment
+ */
enum_base& operator=(const enum_base& e)
{
m_value = e.m_value;
@@ -52,44 +52,44 @@ public:
}
/**
- * Comparison operator
- */
+ * Comparison operator
+ */
bool operator!=(const enum_base& e) const { return (e.m_value != m_value); }
/**
- * integer conversion operator
- */
- constexpr operator int() const { return (m_value); }
+ * integer conversion operator
+ */
+ operator int() const { return (m_value); }
/**
- * Return the value of the enum - same as integer conversion
- */
- constexpr int value() const { return (m_value); }
+ * Return the value of the enum - same as integer conversion
+ */
+ int value() const { return (m_value); }
protected:
/**
- * Constructor of an enum - takes value and string description
- */
- constexpr enum_base(int value, const std::string desc)
+ * Constructor of an enum - takes value and string description
+ */
+ enum_base(int value, const std::string desc)
: m_value(value)
, m_desc(desc)
{
}
/**
- * Constructor
- */
+ * Constructor
+ */
virtual ~enum_base() {}
private:
/**
- * Integer value of the enum
- */
+ * Integer value of the enum
+ */
int m_value;
/**
- * String description
- */
+ * String description
+ */
std::string m_desc;
};
};