replace boost::bind with std::bind
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <boost/locale/conversion.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
@@ -72,6 +71,8 @@
|
||||
|
||||
using Global::myScreen;
|
||||
|
||||
namespace ph = std::placeholders;
|
||||
|
||||
namespace {
|
||||
|
||||
boost::array<
|
||||
@@ -642,14 +643,14 @@ void DeletePlaylistItems::run()
|
||||
if (myScreen == myPlaylist)
|
||||
{
|
||||
Statusbar::print("Deleting items...");
|
||||
auto delete_fun = boost::bind(&MPD::Connection::Delete, _1, _2);
|
||||
auto delete_fun = std::bind(&MPD::Connection::Delete, ph::_1, ph::_2);
|
||||
deleteSelectedSongs(myPlaylist->main(), delete_fun);
|
||||
Statusbar::print("Item(s) deleted");
|
||||
}
|
||||
else if (myScreen->isActiveWindow(myPlaylistEditor->Content))
|
||||
{
|
||||
std::string playlist = myPlaylistEditor->Playlists.current()->value().path();
|
||||
auto delete_fun = boost::bind(&MPD::Connection::PlaylistDelete, _1, playlist, _2);
|
||||
auto delete_fun = std::bind(&MPD::Connection::PlaylistDelete, ph::_1, playlist, ph::_2);
|
||||
Statusbar::print("Deleting items...");
|
||||
deleteSelectedSongs(myPlaylistEditor->Content, delete_fun);
|
||||
Statusbar::print("Item(s) deleted");
|
||||
@@ -875,13 +876,13 @@ void MoveSelectedItemsUp::run()
|
||||
{
|
||||
if (myScreen == myPlaylist)
|
||||
{
|
||||
moveSelectedItemsUp(myPlaylist->main(), boost::bind(&MPD::Connection::Move, _1, _2, _3));
|
||||
moveSelectedItemsUp(myPlaylist->main(), std::bind(&MPD::Connection::Move, ph::_1, ph::_2, ph::_3));
|
||||
}
|
||||
else if (myScreen == myPlaylistEditor)
|
||||
{
|
||||
assert(!myPlaylistEditor->Playlists.empty());
|
||||
std::string playlist = myPlaylistEditor->Playlists.current()->value().path();
|
||||
auto move_fun = boost::bind(&MPD::Connection::PlaylistMove, _1, playlist, _2, _3);
|
||||
auto move_fun = std::bind(&MPD::Connection::PlaylistMove, ph::_1, playlist, ph::_2, ph::_3);
|
||||
moveSelectedItemsUp(myPlaylistEditor->Content, move_fun);
|
||||
}
|
||||
}
|
||||
@@ -898,13 +899,13 @@ void MoveSelectedItemsDown::run()
|
||||
{
|
||||
if (myScreen == myPlaylist)
|
||||
{
|
||||
moveSelectedItemsDown(myPlaylist->main(), boost::bind(&MPD::Connection::Move, _1, _2, _3));
|
||||
moveSelectedItemsDown(myPlaylist->main(), std::bind(&MPD::Connection::Move, ph::_1, ph::_2, ph::_3));
|
||||
}
|
||||
else if (myScreen == myPlaylistEditor)
|
||||
{
|
||||
assert(!myPlaylistEditor->Playlists.empty());
|
||||
std::string playlist = myPlaylistEditor->Playlists.current()->value().path();
|
||||
auto move_fun = boost::bind(&MPD::Connection::PlaylistMove, _1, playlist, _2, _3);
|
||||
auto move_fun = std::bind(&MPD::Connection::PlaylistMove, ph::_1, playlist, ph::_2, ph::_3);
|
||||
moveSelectedItemsDown(myPlaylistEditor->Content, move_fun);
|
||||
}
|
||||
}
|
||||
@@ -920,13 +921,13 @@ void MoveSelectedItemsTo::run()
|
||||
if (myScreen == myPlaylist)
|
||||
{
|
||||
if (!myPlaylist->main().empty())
|
||||
moveSelectedItemsTo(myPlaylist->main(), boost::bind(&MPD::Connection::Move, _1, _2, _3));
|
||||
moveSelectedItemsTo(myPlaylist->main(), std::bind(&MPD::Connection::Move, ph::_1, ph::_2, ph::_3));
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(!myPlaylistEditor->Playlists.empty());
|
||||
std::string playlist = myPlaylistEditor->Playlists.current()->value().path();
|
||||
auto move_fun = boost::bind(&MPD::Connection::PlaylistMove, _1, playlist, _2, _3);
|
||||
auto move_fun = std::bind(&MPD::Connection::PlaylistMove, ph::_1, playlist, ph::_2, ph::_3);
|
||||
moveSelectedItemsTo(myPlaylistEditor->Content, move_fun);
|
||||
}
|
||||
}
|
||||
@@ -1009,8 +1010,8 @@ void ToggleDisplayMode::run()
|
||||
{
|
||||
case DisplayMode::Classic:
|
||||
Config.playlist_display_mode = DisplayMode::Columns;
|
||||
myPlaylist->main().setItemDisplayer(boost::bind(
|
||||
Display::SongsInColumns, _1, myPlaylist->proxySongList()
|
||||
myPlaylist->main().setItemDisplayer(std::bind(
|
||||
Display::SongsInColumns, ph::_1, myPlaylist->proxySongList()
|
||||
));
|
||||
if (Config.titles_visibility)
|
||||
myPlaylist->main().setTitle(Display::Columns(myPlaylist->main().getWidth()));
|
||||
@@ -1019,8 +1020,8 @@ void ToggleDisplayMode::run()
|
||||
break;
|
||||
case DisplayMode::Columns:
|
||||
Config.playlist_display_mode = DisplayMode::Classic;
|
||||
myPlaylist->main().setItemDisplayer(boost::bind(
|
||||
Display::Songs, _1, myPlaylist->proxySongList(), Config.song_list_format
|
||||
myPlaylist->main().setItemDisplayer(std::bind(
|
||||
Display::Songs, ph::_1, myPlaylist->proxySongList(), std::cref(Config.song_list_format)
|
||||
));
|
||||
myPlaylist->main().setTitle("");
|
||||
}
|
||||
@@ -1070,14 +1071,14 @@ void ToggleDisplayMode::run()
|
||||
{
|
||||
case DisplayMode::Classic:
|
||||
Config.playlist_editor_display_mode = DisplayMode::Columns;
|
||||
myPlaylistEditor->Content.setItemDisplayer(boost::bind(
|
||||
Display::SongsInColumns, _1, myPlaylistEditor->contentProxyList()
|
||||
myPlaylistEditor->Content.setItemDisplayer(std::bind(
|
||||
Display::SongsInColumns, ph::_1, myPlaylistEditor->contentProxyList()
|
||||
));
|
||||
break;
|
||||
case DisplayMode::Columns:
|
||||
Config.playlist_editor_display_mode = DisplayMode::Classic;
|
||||
myPlaylistEditor->Content.setItemDisplayer(boost::bind(
|
||||
Display::Songs, _1, myPlaylistEditor->contentProxyList(), Config.song_list_format
|
||||
myPlaylistEditor->Content.setItemDisplayer(std::bind(
|
||||
Display::Songs, ph::_1, myPlaylistEditor->contentProxyList(), std::cref(Config.song_list_format)
|
||||
));
|
||||
break;
|
||||
}
|
||||
@@ -1742,7 +1743,7 @@ void CropMainPlaylist::run()
|
||||
confirmAction("Do you really want to crop main playlist?");
|
||||
Statusbar::print("Cropping playlist...");
|
||||
selectCurrentIfNoneSelected(w);
|
||||
cropPlaylist(w, boost::bind(&MPD::Connection::Delete, _1, _2));
|
||||
cropPlaylist(w, std::bind(&MPD::Connection::Delete, ph::_1, ph::_2));
|
||||
Statusbar::print("Playlist cropped");
|
||||
}
|
||||
|
||||
@@ -1763,7 +1764,7 @@ void CropPlaylist::run()
|
||||
confirmAction(boost::format("Do you really want to crop playlist \"%1%\"?") % playlist);
|
||||
selectCurrentIfNoneSelected(w);
|
||||
Statusbar::printf("Cropping playlist \"%1%\"...", playlist);
|
||||
cropPlaylist(w, boost::bind(&MPD::Connection::PlaylistDelete, _1, playlist, _2));
|
||||
cropPlaylist(w, std::bind(&MPD::Connection::PlaylistDelete, ph::_1, playlist, ph::_2));
|
||||
Statusbar::printf("Playlist \"%1%\" cropped", playlist);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#define NCMPCPP_BINDINGS_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/bind.hpp>
|
||||
#include <cassert>
|
||||
#include <unordered_map>
|
||||
#include "actions.h"
|
||||
@@ -67,7 +66,7 @@ struct Binding
|
||||
|
||||
bool execute() const {
|
||||
return std::all_of(m_actions.begin(), m_actions.end(),
|
||||
boost::bind(&Actions::BaseAction::execute, _1)
|
||||
std::bind(&Actions::BaseAction::execute, std::placeholders::_1)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/locale/conversion.hpp>
|
||||
#include <time.h>
|
||||
@@ -48,6 +47,7 @@ using Global::MainStartY;
|
||||
using Global::myScreen;
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
namespace ph = std::placeholders;
|
||||
|
||||
Browser *myBrowser;
|
||||
|
||||
@@ -83,7 +83,7 @@ Browser::Browser()
|
||||
w.centeredCursor(Config.centered_cursor);
|
||||
w.setSelectedPrefix(Config.selected_item_prefix);
|
||||
w.setSelectedSuffix(Config.selected_item_suffix);
|
||||
w.setItemDisplayer(boost::bind(Display::Items, _1, proxySongList()));
|
||||
w.setItemDisplayer(std::bind(Display::Items, ph::_1, proxySongList()));
|
||||
}
|
||||
|
||||
void Browser::resize()
|
||||
@@ -279,7 +279,7 @@ void Browser::setSearchConstraint(const std::string &constraint)
|
||||
{
|
||||
m_search_predicate = Regex::Filter<MPD::Item>(
|
||||
Regex::make(constraint, Config.regex_type),
|
||||
boost::bind(browserEntryMatcher, _1, _2, false)
|
||||
std::bind(browserEntryMatcher, ph::_1, ph::_2, false)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ struct Lastfm: Screen<NC::Scrollpad>, Tabbable
|
||||
return;
|
||||
|
||||
m_service = std::make_shared<ServiceNoRef>(std::forward<ServiceT>(service));
|
||||
m_worker = boost::async(boost::launch::async, boost::bind(&LastFm::Service::fetch, m_service.get()));
|
||||
m_worker = boost::async(boost::launch::async, std::bind(&LastFm::Service::fetch, m_service.get()));
|
||||
|
||||
w.clear();
|
||||
w << "Fetching information...";
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <boost/locale/conversion.hpp>
|
||||
#include <algorithm>
|
||||
@@ -44,6 +43,8 @@ using Global::MainHeight;
|
||||
using Global::MainStartY;
|
||||
using Global::myScreen;
|
||||
|
||||
namespace ph = std::placeholders;
|
||||
|
||||
MediaLibrary *myLibrary;
|
||||
|
||||
namespace {
|
||||
@@ -200,8 +201,8 @@ MediaLibrary::MediaLibrary()
|
||||
Songs.centeredCursor(Config.centered_cursor);
|
||||
Songs.setSelectedPrefix(Config.selected_item_prefix);
|
||||
Songs.setSelectedSuffix(Config.selected_item_suffix);
|
||||
Songs.setItemDisplayer(boost::bind(
|
||||
Display::Songs, _1, songsProxyList(), Config.song_library_format
|
||||
Songs.setItemDisplayer(std::bind(
|
||||
Display::Songs, ph::_1, songsProxyList(), std::cref(Config.song_library_format)
|
||||
));
|
||||
|
||||
w = &Tags;
|
||||
@@ -564,7 +565,7 @@ void MediaLibrary::setSearchConstraint(const std::string &constraint)
|
||||
{
|
||||
m_albums_search_predicate = Regex::ItemFilter<AlbumEntry>(
|
||||
Regex::make(constraint, Config.regex_type),
|
||||
boost::bind(AlbumEntryMatcher, _1, _2, false)
|
||||
std::bind(AlbumEntryMatcher, ph::_1, ph::_2, false)
|
||||
);
|
||||
}
|
||||
else if (isActiveWindow(Songs))
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
#include "title.h"
|
||||
#include "utility/conversion.h"
|
||||
|
||||
namespace ph = std::placeholders;
|
||||
|
||||
namespace
|
||||
{
|
||||
std::ofstream errorlog;
|
||||
@@ -225,7 +227,7 @@ int main(int argc, char **argv)
|
||||
try
|
||||
{
|
||||
auto k = Bindings.get(input);
|
||||
std::any_of(k.first, k.second, boost::bind(&Binding::execute, _1));
|
||||
std::any_of(k.first, k.second, std::bind(&Binding::execute, ph::_1));
|
||||
}
|
||||
catch (ConversionError &e)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <sstream>
|
||||
|
||||
@@ -38,6 +37,8 @@
|
||||
using Global::MainHeight;
|
||||
using Global::MainStartY;
|
||||
|
||||
namespace ph = std::placeholders;
|
||||
|
||||
Playlist *myPlaylist;
|
||||
|
||||
namespace {
|
||||
@@ -61,13 +62,13 @@ Playlist::Playlist()
|
||||
switch (Config.playlist_display_mode)
|
||||
{
|
||||
case DisplayMode::Classic:
|
||||
w.setItemDisplayer(boost::bind(
|
||||
Display::Songs, _1, proxySongList(), Config.song_list_format
|
||||
w.setItemDisplayer(std::bind(
|
||||
Display::Songs, ph::_1, proxySongList(), std::cref(Config.song_list_format)
|
||||
));
|
||||
break;
|
||||
case DisplayMode::Columns:
|
||||
w.setItemDisplayer(boost::bind(
|
||||
Display::SongsInColumns, _1, proxySongList()
|
||||
w.setItemDisplayer(std::bind(
|
||||
Display::SongsInColumns, ph::_1, proxySongList()
|
||||
));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/lambda/bind.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <cassert>
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
using Global::MainHeight;
|
||||
using Global::MainStartY;
|
||||
|
||||
namespace ph = std::placeholders;
|
||||
|
||||
PlaylistEditor *myPlaylistEditor;
|
||||
|
||||
namespace {
|
||||
@@ -85,12 +87,12 @@ PlaylistEditor::PlaylistEditor()
|
||||
{
|
||||
case DisplayMode::Classic:
|
||||
Content.setItemDisplayer(
|
||||
boost::bind(Display::Songs, _1, contentProxyList(), Config.song_list_format
|
||||
std::bind(Display::Songs, ph::_1, contentProxyList(), std::cref(Config.song_list_format)
|
||||
));
|
||||
break;
|
||||
case DisplayMode::Columns:
|
||||
Content.setItemDisplayer(
|
||||
boost::bind(Display::SongsInColumns, _1, contentProxyList())
|
||||
std::bind(Display::SongsInColumns, ph::_1, contentProxyList())
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include <array>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/range/detail/any_iterator.hpp>
|
||||
#include <iomanip>
|
||||
|
||||
@@ -39,6 +38,8 @@
|
||||
using Global::MainHeight;
|
||||
using Global::MainStartY;
|
||||
|
||||
namespace ph = std::placeholders;
|
||||
|
||||
SearchEngine *mySearcher;
|
||||
|
||||
namespace {
|
||||
@@ -108,7 +109,7 @@ SearchEngine::SearchEngine()
|
||||
w.setHighlightColor(Config.main_highlight_color);
|
||||
w.cyclicScrolling(Config.use_cyclic_scrolling);
|
||||
w.centeredCursor(Config.centered_cursor);
|
||||
w.setItemDisplayer(boost::bind(Display::SEItems, _1, proxySongList()));
|
||||
w.setItemDisplayer(std::bind(Display::SEItems, ph::_1, proxySongList()));
|
||||
w.setSelectedPrefix(Config.selected_item_prefix);
|
||||
w.setSelectedSuffix(Config.selected_item_suffix);
|
||||
SearchMode = &SearchModes[Config.search_engine_default_search_mode];
|
||||
@@ -259,7 +260,7 @@ void SearchEngine::setSearchConstraint(const std::string &constraint)
|
||||
{
|
||||
m_search_predicate = Regex::ItemFilter<SEItem>(
|
||||
Regex::make(constraint, Config.regex_type),
|
||||
boost::bind(SEItemEntryMatcher, _1, _2, false)
|
||||
std::bind(SEItemEntryMatcher, ph::_1, ph::_2, false)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
#include "browser.h"
|
||||
@@ -80,23 +79,23 @@ SelectedItemsAdder::SelectedItemsAdder()
|
||||
m_position_selector.setItemDisplayer(DisplayComponent);
|
||||
|
||||
m_position_selector.addItem(Entry("At the end of playlist",
|
||||
boost::bind(&Self::addAtTheEndOfPlaylist, this)
|
||||
std::bind(&Self::addAtTheEndOfPlaylist, this)
|
||||
));
|
||||
m_position_selector.addItem(Entry("At the beginning of playlist",
|
||||
boost::bind(&Self::addAtTheBeginningOfPlaylist, this)
|
||||
std::bind(&Self::addAtTheBeginningOfPlaylist, this)
|
||||
));
|
||||
m_position_selector.addItem(Entry("After current song",
|
||||
boost::bind(&Self::addAfterCurrentSong, this)
|
||||
std::bind(&Self::addAfterCurrentSong, this)
|
||||
));
|
||||
m_position_selector.addItem(Entry("After current album",
|
||||
boost::bind(&Self::addAfterCurrentAlbum, this)
|
||||
std::bind(&Self::addAfterCurrentAlbum, this)
|
||||
));
|
||||
m_position_selector.addItem(Entry("After highlighted item",
|
||||
boost::bind(&Self::addAfterHighlightedSong, this)
|
||||
std::bind(&Self::addAfterHighlightedSong, this)
|
||||
));
|
||||
m_position_selector.addSeparator();
|
||||
m_position_selector.addItem(Entry("Cancel",
|
||||
boost::bind(&Self::cancel, this)
|
||||
std::bind(&Self::cancel, this)
|
||||
));
|
||||
|
||||
w = &m_playlist_selector;
|
||||
@@ -189,12 +188,12 @@ void SelectedItemsAdder::populatePlaylistSelector(BaseScreen *old_screen)
|
||||
m_playlist_selector.reset();
|
||||
m_playlist_selector.clear();
|
||||
m_playlist_selector.addItem(Entry("Current playlist",
|
||||
boost::bind(&Self::addToCurrentPlaylist, this)
|
||||
std::bind(&Self::addToCurrentPlaylist, this)
|
||||
));
|
||||
if (!in_local_browser)
|
||||
{
|
||||
m_playlist_selector.addItem(Entry("New playlist",
|
||||
boost::bind(&Self::addToNewPlaylist, this)
|
||||
std::bind(&Self::addToNewPlaylist, this)
|
||||
));
|
||||
}
|
||||
m_playlist_selector.addSeparator();
|
||||
@@ -204,7 +203,7 @@ void SelectedItemsAdder::populatePlaylistSelector(BaseScreen *old_screen)
|
||||
for (MPD::PlaylistIterator it = Mpd.GetPlaylists(), end; it != end; ++it)
|
||||
{
|
||||
m_playlist_selector.addItem(Entry(it->path(),
|
||||
boost::bind(&Self::addToExistingPlaylist, this, it->path())
|
||||
std::bind(&Self::addToExistingPlaylist, this, it->path())
|
||||
));
|
||||
};
|
||||
std::sort(m_playlist_selector.beginV()+begin, m_playlist_selector.endV(),
|
||||
@@ -213,7 +212,7 @@ void SelectedItemsAdder::populatePlaylistSelector(BaseScreen *old_screen)
|
||||
m_playlist_selector.addSeparator();
|
||||
}
|
||||
m_playlist_selector.addItem(Entry("Cancel",
|
||||
boost::bind(&Self::cancel, this)
|
||||
std::bind(&Self::cancel, this)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include "charset.h"
|
||||
#include "display.h"
|
||||
#include "global.h"
|
||||
@@ -50,41 +48,41 @@ SortPlaylistDialog::SortPlaylistDialog()
|
||||
});
|
||||
|
||||
w.addItem(Entry(std::make_pair("Artist", &MPD::Song::getArtist),
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Album", &MPD::Song::getAlbum),
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Disc", &MPD::Song::getDisc),
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Track", &MPD::Song::getTrack),
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Genre", &MPD::Song::getGenre),
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Date", &MPD::Song::getDate),
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Composer", &MPD::Song::getComposer),
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Performer", &MPD::Song::getPerformer),
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Title", &MPD::Song::getTitle),
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Filename", &MPD::Song::getURI),
|
||||
boost::bind(&Self::moveSortOrderHint, this)
|
||||
std::bind(&Self::moveSortOrderHint, this)
|
||||
));
|
||||
w.addSeparator();
|
||||
w.addItem(Entry(std::make_pair("Sort", static_cast<MPD::Song::GetFunction>(0)),
|
||||
boost::bind(&Self::sort, this)
|
||||
std::bind(&Self::sort, this)
|
||||
));
|
||||
w.addItem(Entry(std::make_pair("Cancel", static_cast<MPD::Song::GetFunction>(0)),
|
||||
boost::bind(&Self::cancel, this)
|
||||
std::bind(&Self::cancel, this)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#ifdef HAVE_TAGLIB_H
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/locale/conversion.hpp>
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
@@ -46,6 +45,8 @@ using Global::myScreen;
|
||||
using Global::MainHeight;
|
||||
using Global::MainStartY;
|
||||
|
||||
namespace ph = std::placeholders;
|
||||
|
||||
TagEditor *myTagEditor;
|
||||
|
||||
namespace {
|
||||
@@ -719,7 +720,7 @@ void TagEditor::setSearchConstraint(const std::string &constraint)
|
||||
{
|
||||
m_directories_search_predicate = Regex::Filter<std::pair<std::string, std::string>>(
|
||||
Regex::make(constraint, Config.regex_type),
|
||||
boost::bind(DirEntryMatcher, _1, _2, false)
|
||||
std::bind(DirEntryMatcher, ph::_1, ph::_2, false)
|
||||
);
|
||||
}
|
||||
else if (w == Tags)
|
||||
|
||||
Reference in New Issue
Block a user