From 15838f37028a19e7b78f2125d93051acbea13621 Mon Sep 17 00:00:00 2001 From: Karroffel Date: Sun, 5 Mar 2017 15:32:16 +0100 Subject: [PATCH] Added PowerState casting operator to Variant Without it Godot does not build with PTRCALL_ENABLED --- core/variant.cpp | 5 +++++ core/variant.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/core/variant.cpp b/core/variant.cpp index f45c3fd55df..f19dacf26b2 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -2178,6 +2178,11 @@ Variant::operator IP_Address() const { return IP_Address( operator String() ); } +Variant::operator PowerState() const +{ + return (PowerState) operator int(); +} + Variant::Variant(bool p_bool) { type=BOOL; diff --git a/core/variant.h b/core/variant.h index f9ceca1ca0d..12511893143 100644 --- a/core/variant.h +++ b/core/variant.h @@ -45,6 +45,7 @@ #include "path_db.h" #include "simple_type.h" #include "os/input_event.h" +#include "os/power.h" #include "color.h" #include "face3.h" #include "ref_ptr.h" @@ -254,6 +255,7 @@ public: operator Orientation() const; operator IP_Address() const; + operator PowerState() const; Variant(bool p_bool);