]> granicus.if.org Git - icinga2/commitdiff
Implement the assignment operator for the Value class
authorGunnar Beutner <gunnar@beutner.name>
Mon, 2 Mar 2015 11:55:48 +0000 (12:55 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Mon, 2 Mar 2015 11:55:48 +0000 (12:55 +0100)
lib/base/value-operators.cpp
lib/base/value.hpp

index 11fdc9621720fab7188430a99123ba89efce997f..47707653752fe49f94202b69a42609e70efedee6 100644 (file)
@@ -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);
index d0048c586b859c440bffd15ce80ffbb85f272daa..967a10ee1f6c06151fc16586e491fdac94a11877 100644 (file)
@@ -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;