diff --git a/lib/base/object.hpp b/lib/base/object.hpp index 5a90cfa64..aae28ae88 100644 --- a/lib/base/object.hpp +++ b/lib/base/object.hpp @@ -27,7 +27,7 @@ class String; struct DebugInfo; class ValidationUtils; -extern Value Empty; +extern const Value Empty; #define DECLARE_PTR_TYPEDEFS(klass) \ typedef intrusive_ptr Ptr diff --git a/lib/base/value.cpp b/lib/base/value.cpp index 867c8217e..ebf3ba60b 100644 --- a/lib/base/value.cpp +++ b/lib/base/value.cpp @@ -13,7 +13,7 @@ template const bool& Value::Get() const; template const String& Value::Get() const; template const Object::Ptr& Value::Get() const; -Value icinga::Empty; +const Value icinga::Empty; Value::Value(std::nullptr_t) { } diff --git a/lib/base/value.hpp b/lib/base/value.hpp index 86a3b115d..6e64abb43 100644 --- a/lib/base/value.hpp +++ b/lib/base/value.hpp @@ -149,7 +149,7 @@ extern template const bool& Value::Get() const; extern template const String& Value::Get() const; extern template const Object::Ptr& Value::Get() const; -extern Value Empty; +extern const Value Empty; Value operator+(const Value& lhs, const char *rhs); Value operator+(const char *lhs, const Value& rhs);