Skip to content

Commit

Permalink
Replace boost::bind with std::bind
Browse files Browse the repository at this point in the history
  • Loading branch information
aledomu committed Nov 7, 2024
1 parent e6a46e9 commit 5afcb9b
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 15 deletions.
1 change: 1 addition & 0 deletions libs/evoral/ControlSet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "evoral/Event.h"

using namespace std;
using namespace std::placeholders;

namespace Evoral {

Expand Down
5 changes: 2 additions & 3 deletions libs/pbd/receiver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ void
Receiver::listen_to (Transmitter &transmitter)

{
/* odd syntax here because boost's placeholders (_1, _2) are in an
anonymous namespace which causes ambiguity with sigc++ (and will also
do so with std::placeholder in the C++11 future
/* odd syntax here because std's placeholders (_1, _2) are in an
anonymous namespace which causes ambiguity with sigc++
*/
transmitter.sender().connect_same_thread (connections, std::bind (&Receiver::receive, this, std::placeholders::_1, std::placeholders::_2));

Expand Down
2 changes: 0 additions & 2 deletions libs/surfaces/osc/osc_cue_observer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "boost/lambda/lambda.hpp"

#include "pbd/control_math.h"

#include "ardour/track.h"
Expand Down
2 changes: 0 additions & 2 deletions libs/surfaces/osc/osc_global_observer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "boost/lambda/lambda.hpp"

#include "pbd/control_math.h"

#include "ardour/amp.h"
Expand Down
2 changes: 0 additions & 2 deletions libs/surfaces/osc/osc_route_observer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "boost/lambda/lambda.hpp"

#include "pbd/control_math.h"
#include <glibmm.h>

Expand Down
2 changes: 0 additions & 2 deletions libs/surfaces/osc/osc_select_observer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
*/

#include <vector>
#include "boost/lambda/lambda.hpp"

#include "pbd/control_math.h"

#include "ardour/session.h"
Expand Down
4 changes: 2 additions & 2 deletions tools/signal-test/signal-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Rx1
public:
Rx1 (Tx& sender)
{
sender.sig1.connect_same_thread (_connection, boost::bind (&Rx1::cb, this, _1));
sender.sig1.connect_same_thread (_connection, std::bind (&Rx1::cb, this, _1));
}

private:
Expand Down Expand Up @@ -87,7 +87,7 @@ class Rx2 : public PBD::ScopedConnectionList
public:
Rx2 (Tx& sender)
{
sender.sig1.connect (*this, &_ir, boost::bind (&Rx2::cb, this, _1), &event_loop);
sender.sig1.connect (*this, &_ir, std::bind (&Rx2::cb, this, _1), &event_loop);
}

private:
Expand Down
4 changes: 2 additions & 2 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ int main() { return 0; }''',
cxx_flags.append('-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION')
else:
cxx_flags.append('-DBOOST_NO_AUTO_PTR')
cxx_flags.append('-DBOOST_BIND_GLOBAL_PLACEHOLDERS')
cxx_flags.append('-DBOOST_BIND_NO_PLACEHOLDERS')

if (is_clang and platform == "darwin"):
# Silence warnings about the non-existing osx clang compiler flags
Expand Down Expand Up @@ -747,7 +747,7 @@ int main() { return 0; }''',

# need ISOC9X for llabs()
compiler_flags.extend(
('-DBOOST_SYSTEM_NO_DEPRECATED', '-DBOOST_BIND_GLOBAL_PLACEHOLDERS', '-D_ISOC9X_SOURCE',
('-DBOOST_SYSTEM_NO_DEPRECATED', '-DBOOST_BIND_NO_PLACEHOLDERS', '-D_ISOC9X_SOURCE',
'-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64'))
cxx_flags.extend(
('-D__STDC_LIMIT_MACROS', '-D__STDC_FORMAT_MACROS',
Expand Down

0 comments on commit 5afcb9b

Please sign in to comment.