diff options
author | Dirk Huss <dirk_huss@mentor.com> | 2016-02-08 18:31:09 +0100 |
---|---|---|
committer | Dirk Huss <dirk_huss@mentor.com> | 2016-02-08 18:31:09 +0100 |
commit | 274ad1873235b333e1872ac98e7b382553fc7c8f (patch) | |
tree | 0d534911871506fc2714bb71eb3627dd4e2b27b4 /include | |
parent | 77d9cdaf6acee03a1e360e0e1a3cd0b01a95b407 (diff) | |
download | genivi-common-api-runtime-274ad1873235b333e1872ac98e7b382553fc7c8f.tar.gz |
CommonAPI 3.1.6
Diffstat (limited to 'include')
-rw-r--r-- | include/CommonAPI/Enumeration.hpp | 4 | ||||
-rw-r--r-- | include/CommonAPI/Event.hpp | 3 | ||||
-rw-r--r-- | include/CommonAPI/Struct.hpp | 1 | ||||
-rw-r--r-- | include/CommonAPI/Variant.hpp | 6 |
4 files changed, 9 insertions, 5 deletions
diff --git a/include/CommonAPI/Enumeration.hpp b/include/CommonAPI/Enumeration.hpp index 15b4748..2f241e7 100644 --- a/include/CommonAPI/Enumeration.hpp +++ b/include/CommonAPI/Enumeration.hpp @@ -15,6 +15,8 @@ struct Enumeration { value_(_value) { } + virtual ~Enumeration() {} + inline Enumeration &operator=(const Base_ &_value) { value_ = _value; return (*this); @@ -48,6 +50,8 @@ struct Enumeration { return (value_ >= _other.value_); } + virtual bool validate() const = 0; + Base_ value_; }; diff --git a/include/CommonAPI/Event.hpp b/include/CommonAPI/Event.hpp index c1c816a..a31c677 100644 --- a/include/CommonAPI/Event.hpp +++ b/include/CommonAPI/Event.hpp @@ -109,8 +109,7 @@ typename Event<Arguments_...>::Subscription Event<Arguments_...>::subscribe(List subscription = nextSubscription_++; isFirstListener = (0 == pendingSubscriptions_.size()) && (pendingUnsubscriptions_.size() == subscriptions_.size()); listener = std::move(listener); - errorListener = std::move(errorListener); - listeners = std::make_tuple(listener, errorListener); + listeners = std::make_tuple(listener, std::move(errorListener)); pendingSubscriptions_[subscription] = std::move(listeners); subscriptionMutex_.unlock(); diff --git a/include/CommonAPI/Struct.hpp b/include/CommonAPI/Struct.hpp index 6dfb692..82b204c 100644 --- a/include/CommonAPI/Struct.hpp +++ b/include/CommonAPI/Struct.hpp @@ -214,6 +214,7 @@ struct Struct { // Polymorphic structs are mapped to an interface that is derived from the base class // PolymorphicStruct and contain their parameter in a Struct. struct PolymorphicStruct { + virtual ~PolymorphicStruct() {}; virtual Serial getSerial() const = 0; }; diff --git a/include/CommonAPI/Variant.hpp b/include/CommonAPI/Variant.hpp index 4500aae..96f283a 100644 --- a/include/CommonAPI/Variant.hpp +++ b/include/CommonAPI/Variant.hpp @@ -223,7 +223,7 @@ private: public: inline bool hasValue() const { - return (valueType_ <= TypesTupleSize::value); + return (valueType_ != 0); } typename std::aligned_storage<maxSize>::type valueStorage_; @@ -342,12 +342,12 @@ struct ApplyStreamVisitor<Visitor_, Variant_, Deployment_> { static void visit(Visitor_ &, Variant_ &, const Deployment_ *) { - assert(false); + //assert(false); } static void visit(Visitor_ &, const Variant_ &, const Deployment_ *) { - assert(false); + //assert(false); } }; |