Merge pull request #10224 from Icinga/Empty-constant

Make icinga::Empty constant to prevent accidental changes
This commit is contained in:
Yonas Habteab 2024-11-14 10:35:36 +01:00 committed by GitHub
commit d68ee3fcf8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ class String;
struct DebugInfo; struct DebugInfo;
class ValidationUtils; class ValidationUtils;
extern Value Empty; extern const Value Empty;
#define DECLARE_PTR_TYPEDEFS(klass) \ #define DECLARE_PTR_TYPEDEFS(klass) \
typedef intrusive_ptr<klass> Ptr typedef intrusive_ptr<klass> Ptr

View File

@ -13,7 +13,7 @@ template const bool& Value::Get<bool>() const;
template const String& Value::Get<String>() const; template const String& Value::Get<String>() const;
template const Object::Ptr& Value::Get<Object::Ptr>() const; template const Object::Ptr& Value::Get<Object::Ptr>() const;
Value icinga::Empty; const Value icinga::Empty;
Value::Value(std::nullptr_t) Value::Value(std::nullptr_t)
{ } { }

View File

@ -149,7 +149,7 @@ extern template const bool& Value::Get<bool>() const;
extern template const String& Value::Get<String>() const; extern template const String& Value::Get<String>() const;
extern template const Object::Ptr& Value::Get<Object::Ptr>() const; extern template const Object::Ptr& Value::Get<Object::Ptr>() const;
extern Value Empty; extern const Value Empty;
Value operator+(const Value& lhs, const char *rhs); Value operator+(const Value& lhs, const char *rhs);
Value operator+(const char *lhs, const Value& rhs); Value operator+(const char *lhs, const Value& rhs);