From: Gunnar Beutner Date: Mon, 2 Mar 2015 11:55:48 +0000 (+0100) Subject: Implement the assignment operator for the Value class X-Git-Tag: v2.3.0~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d25a2cb224af533e1e58716ac42800fc4cb9e98;p=icinga2 Implement the assignment operator for the Value class --- diff --git a/lib/base/value-operators.cpp b/lib/base/value-operators.cpp index 11fdc9621..477076537 100644 --- a/lib/base/value-operators.cpp +++ b/lib/base/value-operators.cpp @@ -99,6 +99,12 @@ std::istream& icinga::operator>>(std::istream& stream, Value& value) return stream; } +Value& Value::operator=(const Value& other) +{ + m_Value = other.m_Value; + return *this; +} + bool Value::operator==(bool rhs) const { return *this == Value(rhs); diff --git a/lib/base/value.hpp b/lib/base/value.hpp index d0048c586..967a10ee1 100644 --- a/lib/base/value.hpp +++ b/lib/base/value.hpp @@ -111,6 +111,8 @@ public: operator double(void) const; operator String(void) const; + Value& operator=(const Value& other); + bool operator==(bool rhs) const; bool operator!=(bool rhs) const;