From 94d4abe77d542d13c3b167af033f8a425387cc42 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 22 Mar 2022 09:38:10 +0100 Subject: [PATCH] Added is_null() helper method to variant. --- core/variant.h | 1 + 1 file changed, 1 insertion(+) diff --git a/core/variant.h b/core/variant.h index 2d241d463..480a51cba 100644 --- a/core/variant.h +++ b/core/variant.h @@ -182,6 +182,7 @@ public: bool is_ref() const; _FORCE_INLINE_ bool is_num() const { return type == INT || type == REAL; }; _FORCE_INLINE_ bool is_array() const { return type >= ARRAY; }; + _FORCE_INLINE_ bool is_null() const { return type == NIL; }; bool is_shared() const; bool is_zero() const; bool is_one() const;