Skip to content

Commit

Permalink
Merge pull request #10224 from Icinga/Empty-constant
Browse files Browse the repository at this point in the history
Make icinga::Empty constant to prevent accidental changes
  • Loading branch information
yhabteab authored Nov 14, 2024
2 parents 7a20d98 + 09160ea commit d68ee3f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/base/object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<klass> Ptr
Expand Down
2 changes: 1 addition & 1 deletion lib/base/value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ template const bool& Value::Get<bool>() const;
template const String& Value::Get<String>() const;
template const Object::Ptr& Value::Get<Object::Ptr>() const;

Value icinga::Empty;
const Value icinga::Empty;

Value::Value(std::nullptr_t)
{ }
Expand Down
2 changes: 1 addition & 1 deletion lib/base/value.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ extern template const bool& Value::Get<bool>() const;
extern template const String& Value::Get<String>() 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 char *lhs, const Value& rhs);
Expand Down

0 comments on commit d68ee3f

Please sign in to comment.