PEL: Allow default AdditionalData construction
Enable the default contructor so that an object can be created
without needing any data.
Also make getValue() const as it is const.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Id81879e0367edb1055cbf848ed738bc8dd86e953
diff --git a/extensions/openpower-pels/additional_data.hpp b/extensions/openpower-pels/additional_data.hpp
index 5cea69b..b855054 100644
--- a/extensions/openpower-pels/additional_data.hpp
+++ b/extensions/openpower-pels/additional_data.hpp
@@ -23,7 +23,7 @@
class AdditionalData
{
public:
- AdditionalData() = delete;
+ AdditionalData() = default;
~AdditionalData() = default;
AdditionalData(const AdditionalData&) = default;
AdditionalData& operator=(const AdditionalData&) = default;
@@ -57,7 +57,7 @@
*
* @return optional<string> - the value, if found
*/
- std::optional<std::string> getValue(const std::string& key)
+ std::optional<std::string> getValue(const std::string& key) const
{
auto entry = _data.find(key);
if (entry != _data.end())