modernize C++: move from boost::bind to std::bind

This commit is contained in:
wmayer
2023-08-08 14:19:00 +02:00
committed by wwmayer
parent 7bb6f48dbd
commit 68d22d864b
64 changed files with 279 additions and 266 deletions

View File

@@ -51,7 +51,7 @@ FC_LOG_LEVEL_INIT("Spreadsheet", true, true)
using namespace App;
using namespace Base;
using namespace Spreadsheet;
namespace bp = boost::placeholders;
namespace sp = std::placeholders;
TYPESYSTEM_SOURCE(Spreadsheet::PropertySheet , App::PropertyExpressionContainer)
@@ -849,7 +849,7 @@ void PropertySheet::insertRows(int row, int count)
boost::copy( data | boost::adaptors::map_keys, std::back_inserter(keys));
/* Sort them */
std::sort(keys.begin(), keys.end(), boost::bind(&PropertySheet::rowSortFunc, this, bp::_1, bp::_2));
std::sort(keys.begin(), keys.end(), std::bind(&PropertySheet::rowSortFunc, this, sp::_1, sp::_2));
MoveCellsExpressionVisitor<PropertySheet> visitor(*this,
CellAddress(row, CellAddress::MAX_COLUMNS), count, 0);
@@ -919,7 +919,7 @@ void PropertySheet::removeRows(int row, int count)
boost::copy(data | boost::adaptors::map_keys, std::back_inserter(keys));
/* Sort them */
std::sort(keys.begin(), keys.end(), boost::bind(&PropertySheet::rowSortFunc, this, bp::_1, bp::_2));
std::sort(keys.begin(), keys.end(), std::bind(&PropertySheet::rowSortFunc, this, sp::_1, sp::_2));
MoveCellsExpressionVisitor<PropertySheet> visitor(*this,
CellAddress(row + count - 1, CellAddress::MAX_COLUMNS), -count, 0);
@@ -1047,7 +1047,7 @@ void PropertySheet::removeColumns(int col, int count)
boost::copy(data | boost::adaptors::map_keys, std::back_inserter(keys));
/* Sort them */
std::sort(keys.begin(), keys.end(), boost::bind(&PropertySheet::colSortFunc, this, bp::_1, bp::_2));
std::sort(keys.begin(), keys.end(), std::bind(&PropertySheet::colSortFunc, this, sp::_1, sp::_2));
MoveCellsExpressionVisitor<PropertySheet> visitor(*this,
CellAddress(CellAddress::MAX_ROWS, col + count - 1), 0, -count);
@@ -1414,8 +1414,8 @@ void PropertySheet::slotChangedObject(const App::DocumentObject &obj, const App:
}
void PropertySheet::onAddDep(App::DocumentObject *obj) {
depConnections[obj] = obj->signalChanged.connect(boost::bind(
&PropertySheet::slotChangedObject, this, bp::_1, bp::_2));
depConnections[obj] = obj->signalChanged.connect(std::bind(
&PropertySheet::slotChangedObject, this, sp::_1, sp::_2));
}
void PropertySheet::onRemoveDep(App::DocumentObject *obj) {