mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
Merge pull request #49469 from groud/remove_variant_operator
Make sure Variant is not implicitely cast when using operator[]
This commit is contained in:
commit
edc2686687
@ -346,6 +346,10 @@ public:
|
|||||||
bool is_one() const;
|
bool is_one() const;
|
||||||
bool is_null() const;
|
bool is_null() const;
|
||||||
|
|
||||||
|
// Make sure Variant is not implicitly cast when accessing it with bracket notation (GH-49469).
|
||||||
|
Variant &operator[](const Variant &p_key) = delete;
|
||||||
|
const Variant &operator[](const Variant &p_key) const = delete;
|
||||||
|
|
||||||
operator bool() const;
|
operator bool() const;
|
||||||
operator signed int() const;
|
operator signed int() const;
|
||||||
operator unsigned int() const; // this is the real one
|
operator unsigned int() const; // this is the real one
|
||||||
|
Loading…
Reference in New Issue
Block a user