From c43436d970ec65e5a0727af8b7bbdcc0a7c94f3e Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 11 Mar 2019 21:13:58 +0100 Subject: [PATCH] misc --- src/easy/easy.hpp | 5 +++++ src/easy/entity.cpp | 3 ++- src/easy/simple_calls.cpp | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/easy/easy.hpp b/src/easy/easy.hpp index 58cc899..f314f80 100644 --- a/src/easy/easy.hpp +++ b/src/easy/easy.hpp @@ -356,6 +356,11 @@ public: */ virtual ~Entity(); + /*! + * Returns the JSON object of the Entity + * + * @since 0.100.0 + */ operator const Json::Value() const; /*! diff --git a/src/easy/entity.cpp b/src/easy/entity.cpp index df51565..ae2ca4a 100644 --- a/src/easy/entity.cpp +++ b/src/easy/entity.cpp @@ -39,7 +39,8 @@ Easy::Entity::Entity(const Json::Value &object) {} Easy::Entity::Entity() -: _was_set(false) +: _tree(Json::nullValue) +, _was_set(false) {} Easy::Entity::~Entity() diff --git a/src/easy/simple_calls.cpp b/src/easy/simple_calls.cpp index 4ac660b..dfce346 100644 --- a/src/easy/simple_calls.cpp +++ b/src/easy/simple_calls.cpp @@ -155,7 +155,7 @@ const return_entity_vector Easy::get_notifications(const uint16_t limit, // Transform vector of strings to vector of Notification. std::transform(answer_v.begin(), answer_v.end(), notifications.begin(), - [](const string s) + [](const string &s) { return GenericEntity(s); }); return { ret.error_code, ret.error_message, notifications };