From: Thomas Geymayer Date: Tue, 6 Nov 2012 18:34:23 +0000 (+0100) Subject: Jenkins has some problems with bind and lambdas. Let's try it with ordinary function... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=81bee2bbc6b3cb4c4971bc72a0ea10d8ffbf9609;p=simgear.git Jenkins has some problems with bind and lambdas. Let's try it with ordinary function pointers... --- diff --git a/simgear/canvas/canvas_fwd.hxx b/simgear/canvas/canvas_fwd.hxx index 4c64c1d0..802a8827 100644 --- a/simgear/canvas/canvas_fwd.hxx +++ b/simgear/canvas/canvas_fwd.hxx @@ -46,9 +46,9 @@ namespace canvas typedef boost::weak_ptr ElementWeakPtr; typedef std::map Style; - typedef boost::function ElementFactory; + typedef ElementPtr (*ElementFactory)( const CanvasWeakPtr&, + const SGPropertyNode_ptr&, + const Style& ); typedef osg::ref_ptr FontPtr; diff --git a/simgear/canvas/elements/CanvasGroup.cxx b/simgear/canvas/elements/CanvasGroup.cxx index 89c62a62..375c171f 100644 --- a/simgear/canvas/elements/CanvasGroup.cxx +++ b/simgear/canvas/elements/CanvasGroup.cxx @@ -22,30 +22,21 @@ #include "CanvasPath.hxx" #include "CanvasText.hxx" -#include #include -#include -#include namespace simgear { namespace canvas { /** - * Create an ElementFactory for elements of type T + * Create an canvas Element of type T */ template - ElementFactory createElementFactory() + ElementPtr createElement( const CanvasWeakPtr& canvas, + const SGPropertyNode_ptr& node, + const Style& style ) { - return boost::bind - ( - &boost::make_shared, - boost::lambda::_1, - boost::lambda::_2, - boost::lambda::_3 - ); + return ElementPtr( new T(canvas, node, style) ); } //---------------------------------------------------------------------------- @@ -54,11 +45,11 @@ namespace canvas const Style& parent_style ): Element(canvas, node, parent_style) { - _child_factories["group"] = createElementFactory(); - _child_factories["image"] = createElementFactory(); - _child_factories["map" ] = createElementFactory(); - _child_factories["path" ] = createElementFactory(); - _child_factories["text" ] = createElementFactory(); + _child_factories["group"] = &createElement; + _child_factories["image"] = &createElement; + _child_factories["map" ] = &createElement; + _child_factories["path" ] = &createElement; + _child_factories["text" ] = &createElement; } //----------------------------------------------------------------------------