diff options
| author | Juan Linietsky | 2014-12-16 22:33:35 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-12-16 22:33:35 -0300 |
| commit | d55f95e0d2a2f99a4130a33ad542c3682d0b92db (patch) | |
| tree | 5e413e2e81398254ac2e5d7421c5fd893ef537a7 /core/variant.h | |
| parent | bcf27feb980aec593c7cb771984e46113cfad757 (diff) | |
| parent | 1664cd67101722f0955385ed6b463f534830aeed (diff) | |
| download | godot-d55f95e0d2a2f99a4130a33ad542c3682d0b92db.tar.gz godot-d55f95e0d2a2f99a4130a33ad542c3682d0b92db.tar.zst godot-d55f95e0d2a2f99a4130a33ad542c3682d0b92db.zip | |
Diffstat (limited to 'core/variant.h')
| -rw-r--r-- | core/variant.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/variant.h b/core/variant.h index b85c1ea64..a2f4a63e6 100644 --- a/core/variant.h +++ b/core/variant.h @@ -167,13 +167,17 @@ public: static String get_type_name(Variant::Type p_type); static bool can_convert(Type p_type_from,Type p_type_to); +#pragma runtime_checks( "", off ) + template<class T> static Type get_type_for() { GetSimpleType<T> t; Variant v(t.type); - return v.get_type(); + Type r = v.get_type(); + return r; } +#pragma runtime_checks( "", restore ) bool is_ref() const; _FORCE_INLINE_ bool is_num() const { return type==INT || type==REAL; }; |
