Prechádzať zdrojové kódy

better Variant casting

Karroffel 8 rokov pred
rodič
commit
1c5eeee512
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      include/core/Godot.hpp

+ 1 - 1
include/core/Godot.hpp

@@ -66,7 +66,7 @@ template<class T>
 struct _ArgCast {
 	static T _arg_cast(Variant a)
 	{
-		return (T) a;
+		return a.operator T();
 	}
 };