From e0ee7820d7465e93871b96c49c295de3ad7a307b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 12 Apr 2018 21:00:42 +0100 Subject: C++17 Remove straggling references to Boost things now in standard C++. --- gentoobrowse-api/service/maintenance/updatesProcessor.cpp | 3 +-- gentoobrowse-api/service/maintenanceGitOperations.cpp | 9 +++++---- gentoobrowse-api/service/maintenanceimpl.h | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/gentoobrowse-api/service/maintenance/updatesProcessor.cpp b/gentoobrowse-api/service/maintenance/updatesProcessor.cpp index 77e55e1..bf2b2d3 100644 --- a/gentoobrowse-api/service/maintenance/updatesProcessor.cpp +++ b/gentoobrowse-api/service/maintenance/updatesProcessor.cpp @@ -7,7 +7,6 @@ #include "utils/entityWhereFilter.h" #include #include -#include #include #include #include @@ -45,7 +44,7 @@ namespace Gentoo { this->cols = { "updatePack", "catfrom", "namefrom", "catto", "nameto" }; this->where = &updatePacks; this->order = this; - this->beforeInsert = boost::bind(&UpdatesPatch::move, this, _1); + this->beforeInsert = std::bind(&UpdatesPatch::move, this, std::placeholders::_1); drop = db->modify("DROP TABLE " + this->src); } diff --git a/gentoobrowse-api/service/maintenanceGitOperations.cpp b/gentoobrowse-api/service/maintenanceGitOperations.cpp index c68abd1..347acff 100644 --- a/gentoobrowse-api/service/maintenanceGitOperations.cpp +++ b/gentoobrowse-api/service/maintenanceGitOperations.cpp @@ -17,6 +17,7 @@ namespace Gentoo { namespace Service { using namespace Utils::Git; + namespace pl = std::placeholders; typedef std::set StringSet; @@ -198,11 +199,11 @@ namespace Gentoo { fps[processor->phase()].insert({ processor->order(), processor })->second->prepare(dbc); } // Processor -> repoId, PathParts, Path - typedef boost::function FileHandleFunc; + typedef std::function FileHandleFunc; std::map funcs; - funcs[GIT_DELTA_DELETED] = boost::bind(&AbstractFileProcessor::deleted, _1, dbc, _2, _3); - funcs[GIT_DELTA_MODIFIED] = boost::bind(&AbstractFileProcessor::modified, _1, dbc, _2, _3, _4); - funcs[GIT_DELTA_ADDED] = boost::bind(&AbstractFileProcessor::created, _1, dbc, _2, _3, _4); + funcs[GIT_DELTA_DELETED] = std::bind(&AbstractFileProcessor::deleted, pl::_1, dbc, pl::_2, pl::_3); + funcs[GIT_DELTA_MODIFIED] = std::bind(&AbstractFileProcessor::modified, pl::_1, dbc, pl::_2, pl::_3, pl::_4); + funcs[GIT_DELTA_ADDED] = std::bind(&AbstractFileProcessor::created, pl::_1, dbc, pl::_2, pl::_3, pl::_4); // Phases for (const auto & phase : fps) { diff --git a/gentoobrowse-api/service/maintenanceimpl.h b/gentoobrowse-api/service/maintenanceimpl.h index bb76106..ae0bdd8 100644 --- a/gentoobrowse-api/service/maintenanceimpl.h +++ b/gentoobrowse-api/service/maintenanceimpl.h @@ -6,7 +6,6 @@ #include #include #include -#include #include #include "maintenance/abstractFileProcessor.h" #include -- cgit v1.2.3