From 98752a97029a42640c08ff9abd331e2ce7101e6c Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Sat, 6 May 2017 15:12:06 +0200 Subject: [PATCH] replace boost::bind --- apps/openmw/mwgui/dialogue.cpp | 4 +--- apps/openmw/mwgui/journalwindow.cpp | 5 ++--- components/files/configurationmanager.cpp | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index c03673b90..2c5adfbab 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -1,7 +1,5 @@ #include "dialogue.hpp" -#include - #include #include #include @@ -281,7 +279,7 @@ namespace MWGui mScrollBar->eventScrollChangePosition += MyGUI::newDelegate(this, &DialogueWindow::onScrollbarMoved); mHistory->eventMouseWheel += MyGUI::newDelegate(this, &DialogueWindow::onMouseWheel); - BookPage::ClickCallback callback = boost::bind (&DialogueWindow::notifyLinkClicked, this, _1); + BookPage::ClickCallback callback = std::bind (&DialogueWindow::notifyLinkClicked, this, std::placeholders::_1); mHistory->adviseLinkClicked(callback); mMainWidget->castType()->eventWindowChangeCoord += MyGUI::newDelegate(this, &DialogueWindow::onWindowResize); diff --git a/apps/openmw/mwgui/journalwindow.cpp b/apps/openmw/mwgui/journalwindow.cpp index 9af87c7ae..5f309f148 100644 --- a/apps/openmw/mwgui/journalwindow.cpp +++ b/apps/openmw/mwgui/journalwindow.cpp @@ -9,7 +9,6 @@ #include #include -#include #include #include @@ -124,7 +123,7 @@ namespace { MWGui::BookPage::ClickCallback callback; - callback = boost::bind (&JournalWindowImpl::notifyTopicClicked, this, _1); + callback = std::bind (&JournalWindowImpl::notifyTopicClicked, this, std::placeholders::_1); getPage (LeftBookPage)->adviseLinkClicked (callback); getPage (RightBookPage)->adviseLinkClicked (callback); @@ -136,7 +135,7 @@ namespace { MWGui::BookPage::ClickCallback callback; - callback = boost::bind (&JournalWindowImpl::notifyIndexLinkClicked, this, _1); + callback = std::bind(&JournalWindowImpl::notifyIndexLinkClicked, this, std::placeholders::_1); getPage (LeftTopicIndex)->adviseLinkClicked (callback); getPage (RightTopicIndex)->adviseLinkClicked (callback); diff --git a/components/files/configurationmanager.cpp b/components/files/configurationmanager.cpp index b53e3834a..46dbca8dc 100644 --- a/components/files/configurationmanager.cpp +++ b/components/files/configurationmanager.cpp @@ -7,7 +7,6 @@ #include -#include #include #include #include @@ -130,7 +129,7 @@ void ConfigurationManager::processPaths(Files::PathContainer& dataDirs, bool cre } dataDirs.erase(std::remove_if(dataDirs.begin(), dataDirs.end(), - boost::bind(&boost::filesystem::path::empty, _1)), dataDirs.end()); + std::bind(&boost::filesystem::path::empty, std::placeholders::_1)), dataDirs.end()); } bool ConfigurationManager::loadConfig(const boost::filesystem::path& path,