summaryrefslogtreecommitdiff
path: root/src/playlist.cpp
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2012-09-08 03:35:52 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2012-09-08 03:35:52 +0200
commit057922d2a610fc0b7a49fb12560b1c7f3a4726f1 (patch)
treea94f27e144e09726c3840b9a7cc4f1c2d84fc3f2 /src/playlist.cpp
parenta26b1f62f969296e26adcfcf7a0be584f3cd2d39 (diff)
make use of std::locale based strings comparison
Diffstat (limited to 'src/playlist.cpp')
-rw-r--r--src/playlist.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/playlist.cpp b/src/playlist.cpp
index dfba954b..ffba208c 100644
--- a/src/playlist.cpp
+++ b/src/playlist.cpp
@@ -197,9 +197,9 @@ void Playlist::EnterPressed()
for (; begin != end; ++begin)
playlist.push_back(begin->value());
+ LocaleStringComparison cmp(std::locale(""), Config.ignore_leading_the);
std::function<void(MPD::SongList::iterator, MPD::SongList::iterator)> iter_swap, quick_sort;
- auto song_cmp = [](const MPD::Song &a, const MPD::Song &b) -> bool {
- CaseInsensitiveStringComparison cmp(Config.ignore_leading_the);
+ auto song_cmp = [&cmp](const MPD::Song &a, const MPD::Song &b) -> bool {
for (size_t i = 0; i < SortOptions; ++i)
if (int ret = cmp(a.getTags((*SortDialog)[i].value().second), b.getTags((*SortDialog)[i].value().second)))
return ret < 0;