From 5dddba26ac72a32a196c3aaeacd1045380d65493 Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Wed, 4 Jun 2014 02:46:57 +0200 Subject: [PATCH] Fix headless build and reduce include dependencies. --- simgear/nasal/cppbind/detail/nasal_traits.hxx | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/simgear/nasal/cppbind/detail/nasal_traits.hxx b/simgear/nasal/cppbind/detail/nasal_traits.hxx index b37c5114..62c4d302 100644 --- a/simgear/nasal/cppbind/detail/nasal_traits.hxx +++ b/simgear/nasal/cppbind/detail/nasal_traits.hxx @@ -20,18 +20,32 @@ #ifndef SG_NASAL_TRAITS_HXX_ #define SG_NASAL_TRAITS_HXX_ -#include -#include +#include +#include -#include -#include +// Forward declarations +class SGWeakReferenced; +template class SGSharedPtr; +template class SGWeakPtr; +template class SGVec2; -#include -#include +namespace boost +{ + template class shared_ptr; + template class weak_ptr; +} +namespace osg +{ + template class ref_ptr; + template class observer_ptr; -#include -#include + class Vec2b; + class Vec2d; + class Vec2f; + class Vec2s; +} +// The actual traits... namespace nasal { template @@ -42,25 +56,11 @@ namespace nasal struct attr< type >:\ public boost::integral_constant {}; -#ifdef SGVec2_H - SG_MAKE_TRAIT(, SGVec2, is_vec2) -#endif - -#ifdef OSG_VEC2B - SG_MAKE_TRAIT(<>, osg::Vec2b, is_vec2) -#endif - -#ifdef OSG_VEC2D - SG_MAKE_TRAIT(<>, osg::Vec2d, is_vec2) -#endif - -#ifdef OSG_VEC2F - SG_MAKE_TRAIT(<>, osg::Vec2f, is_vec2) -#endif - -#ifdef OSG_VEC2S - SG_MAKE_TRAIT(<>, osg::Vec2s, is_vec2) -#endif +SG_MAKE_TRAIT(, SGVec2, is_vec2) +SG_MAKE_TRAIT(<>, osg::Vec2b, is_vec2) +SG_MAKE_TRAIT(<>, osg::Vec2d, is_vec2) +SG_MAKE_TRAIT(<>, osg::Vec2f, is_vec2) +SG_MAKE_TRAIT(<>, osg::Vec2s, is_vec2) #undef SG_MAKE_TRAIT -- 2.39.2