From bdf6b25338f85f31ac68c62fbcedfeced466a7f3 Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Wed, 4 Jun 2014 03:16:02 +0200 Subject: [PATCH] Now the real fix for old compilers... --- simgear/nasal/cppbind/Ghost.hxx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) 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() -- 2.39.5