modernize C++: move from boost::bind to std::bind
This commit is contained in:
@@ -22,6 +22,9 @@
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
#include <functional>
|
||||
#endif
|
||||
|
||||
#include <CXX/Objects.hxx>
|
||||
#include "Application.h"
|
||||
@@ -32,7 +35,7 @@
|
||||
|
||||
|
||||
using namespace App;
|
||||
namespace bp = boost::placeholders;
|
||||
namespace sp = std::placeholders;
|
||||
|
||||
std::vector<DocumentObserverPython*> DocumentObserverPython::_instances;
|
||||
|
||||
@@ -62,7 +65,7 @@ DocumentObserverPython::DocumentObserverPython(const Py::Object& obj) : inst(obj
|
||||
FC_PY_GetCallable(obj.ptr(), "slot" #_name1, py##_name1.py);\
|
||||
if (!py##_name1.py.isNone())\
|
||||
py##_name1.slot = App::GetApplication().signal##_name2.connect(\
|
||||
boost::bind(&DocumentObserverPython::slot##_name1, this));\
|
||||
std::bind(&DocumentObserverPython::slot##_name1, this));\
|
||||
}\
|
||||
while(0);
|
||||
|
||||
@@ -71,7 +74,7 @@ DocumentObserverPython::DocumentObserverPython(const Py::Object& obj) : inst(obj
|
||||
FC_PY_GetCallable(obj.ptr(), "slot" #_name1, py##_name1.py);\
|
||||
if (!py##_name1.py.isNone())\
|
||||
py##_name1.slot = App::GetApplication().signal##_name2.connect(\
|
||||
boost::bind(&DocumentObserverPython::slot##_name1, this, bp::_1));\
|
||||
std::bind(&DocumentObserverPython::slot##_name1, this, sp::_1));\
|
||||
}\
|
||||
while(0);
|
||||
|
||||
@@ -79,7 +82,7 @@ DocumentObserverPython::DocumentObserverPython(const Py::Object& obj) : inst(obj
|
||||
FC_PY_GetCallable(obj.ptr(), "slot" #_name1, py##_name1.py);\
|
||||
if (!py##_name1.py.isNone())\
|
||||
py##_name1.slot = App::GetApplication().signal##_name2.connect(\
|
||||
boost::bind(&DocumentObserverPython::slot##_name1, this, bp::_1, bp::_2));\
|
||||
std::bind(&DocumentObserverPython::slot##_name1, this, sp::_1, sp::_2));\
|
||||
}\
|
||||
while(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user