]> granicus.if.org Git - icinga2/commitdiff
Fixed Variant::IsEmpty()
authorGunnar Beutner <gunnar.beutner@netways.de>
Fri, 13 Jul 2012 09:24:05 +0000 (11:24 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 13 Jul 2012 09:24:05 +0000 (11:24 +0200)
base/variant.cpp
base/variant.h

index 330989a7455377db24eb41db4486156ec88a39ea..dfddc6ca4e7d064c0220924e4bef74d724895b83 100644 (file)
@@ -28,7 +28,7 @@ using namespace icinga;
  */
 bool Variant::IsEmpty(void) const
 {
-       return (m_Value.empty());
+       return (m_Value.type() == typeid(boost::blank));
 }
 
 bool Variant::IsScalar(void) const
index 4889518a57011db98cf197d9eec99e511eb404b4..7919f759f2e96a2a21d74c1b5afb01978eab3c0e 100644 (file)
@@ -105,7 +105,7 @@ public:
        }
 
 private:
-       mutable boost::variant<double, string, Object::Ptr> m_Value;
+       mutable boost::variant<boost::blank, double, string, Object::Ptr> m_Value;
 };
 
 }