Replace boost::bind by std::bind and lambda function

This commit is contained in:
gallaert
2020-04-22 14:04:21 +01:00
committed by James Turner
parent b13d7f9392
commit 2ff6a4966a
13 changed files with 94 additions and 116 deletions
+1 -3
View File
@@ -22,8 +22,6 @@
#include <ctime>
#include <map>
#include <boost/bind.hpp>
#include <simgear/misc/sg_path.hxx>
#include <simgear/props/props.hxx>
@@ -148,7 +146,7 @@ public:
template<class C>
void addStatusCallback(C* instance, void (C::*mem_func)(Catalog*))
{
return addStatusCallback(boost::bind(mem_func, instance, _1));
return addStatusCallback(std::bind(mem_func, instance, std::placeholders::_1));
}
bool isUserEnabled() const;
+8 -6
View File
@@ -29,8 +29,6 @@
#include <simgear/structure/SGSharedPtr.hxx>
#include <simgear/io/HTTPRequest.hxx>
#include <boost/bind.hpp>
namespace simgear
{
@@ -112,7 +110,7 @@ public:
template<class C>
Install* done(C* instance, void (C::*mem_func)(Install*))
{
return done(boost::bind(mem_func, instance, _1));
return done(std::bind(mem_func, instance, std::placeholders::_1));
}
/**
@@ -126,7 +124,7 @@ public:
template<class C>
Install* fail(C* instance, void (C::*mem_func)(Install*))
{
return fail(boost::bind(mem_func, instance, _1));
return fail(std::bind(mem_func, instance, std::placeholders::_1));
}
/**
@@ -141,7 +139,7 @@ public:
template<class C>
Install* always(C* instance, void (C::*mem_func)(Install*))
{
return always(boost::bind(mem_func, instance, _1));
return always(std::bind(mem_func, instance, std::placeholders::_1));
}
/**
@@ -155,7 +153,11 @@ public:
Install* progress(C* instance,
void (C::*mem_func)(Install*, unsigned int, unsigned int))
{
return progress(boost::bind(mem_func, instance, _1, _2, _3));
return progress(std::bind(mem_func,
instance,
std::placeholders::_1,
std::placeholders::_2,
std::placeholders::_3));
}
private: