Kaydet (Commit) 9e90038b authored tarafından Michael Stahl's avatar Michael Stahl

canvas: replace boost::function with std::function

Change-Id: Ia3644bc0d9db2159aa4e9f05ca2f36e60b63e6f4
üst 69885050
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <GL/glew.h> #include <GL/glew.h>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/function.hpp>
#include <memory> #include <memory>
......
...@@ -297,7 +297,7 @@ namespace oglcanvas ...@@ -297,7 +297,7 @@ namespace oglcanvas
SpriteComparator()); SpriteComparator());
std::for_each(aSprites.begin(), std::for_each(aSprites.begin(),
aSprites.end(), aSprites.end(),
boost::mem_fn(&CanvasCustomSprite::renderSprite)); std::mem_fn(&CanvasCustomSprite::renderSprite));
// frame counter, other info // frame counter, other info
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <canvas/canvastools.hxx> #include <canvas/canvastools.hxx>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/function.hpp>
#define SERVICE_NAME "com.sun.star.rendering.SimpleCanvas" #define SERVICE_NAME "com.sun.star.rendering.SimpleCanvas"
......
...@@ -110,7 +110,7 @@ namespace canvas ...@@ -110,7 +110,7 @@ namespace canvas
throwUnknown( aPropertyName ); throwUnknown( aPropertyName );
} }
if( aCallbacks.setter.empty() ) if (!aCallbacks.setter)
throwVeto( aPropertyName ); throwVeto( aPropertyName );
aCallbacks.setter(aValue); aCallbacks.setter(aValue);
...@@ -126,7 +126,7 @@ namespace canvas ...@@ -126,7 +126,7 @@ namespace canvas
throwUnknown( aPropertyName ); throwUnknown( aPropertyName );
} }
if( !aCallbacks.getter.empty() ) if (aCallbacks.getter)
return aCallbacks.getter(); return aCallbacks.getter();
// TODO(Q1): subtlety, empty getter method silently returns // TODO(Q1): subtlety, empty getter method silently returns
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <canvas/canvastools.hxx> #include <canvas/canvastools.hxx>
#include <boost/function.hpp> #include <functional>
#include <vector> #include <vector>
#include <memory> #include <memory>
...@@ -50,8 +50,8 @@ namespace canvas ...@@ -50,8 +50,8 @@ namespace canvas
class CANVASTOOLS_DLLPUBLIC PropertySetHelper class CANVASTOOLS_DLLPUBLIC PropertySetHelper
{ {
public: public:
typedef boost::function0< ::com::sun::star::uno::Any > GetterType; typedef std::function<::com::sun::star::uno::Any ()> GetterType;
typedef boost::function1<void, const ::com::sun::star::uno::Any&> SetterType; typedef std::function<void (const ::com::sun::star::uno::Any&)> SetterType;
struct Callbacks struct Callbacks
{ {
GetterType getter; GetterType getter;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment