From: Thomas Geymayer Date: Wed, 4 Jun 2014 01:16:02 +0000 (+0200) Subject: Now the real fix for old compilers... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bdf6b25338f85f31ac68c62fbcedfeced466a7f3;p=simgear.git Now the real fix for old compilers... --- diff --git a/simgear/nasal/cppbind/Ghost.hxx b/simgear/nasal/cppbind/Ghost.hxx index f16ea20c..deb3ed2c 100644 --- a/simgear/nasal/cppbind/Ghost.hxx +++ b/simgear/nasal/cppbind/Ghost.hxx @@ -1168,13 +1168,18 @@ namespace nasal SG_GET_TEMPLATE_MEMBER(Ghost, destroy); _ghost_type_weak.name = _name_weak.c_str(); - bool can_weak = supports_weak_ref::value; - _ghost_type_weak.get_member = can_weak - ? SG_GET_TEMPLATE_MEMBER(Ghost, getMember) - : 0; - _ghost_type_weak.set_member = can_weak - ? SG_GET_TEMPLATE_MEMBER(Ghost, setMember) - : 0; + if( supports_weak_ref::value ) + { + _ghost_type_weak.get_member = + SG_GET_TEMPLATE_MEMBER(Ghost, getMember); + _ghost_type_weak.set_member = + SG_GET_TEMPLATE_MEMBER(Ghost, setMember); + } + else + { + _ghost_type_weak.get_member = 0; + _ghost_type_weak.set_member = 0; + } } static GhostPtr& getSingletonHolder()