summaryrefslogtreecommitdiff
path: root/src/utility/comparators.cpp
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2014-08-29 17:10:40 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2014-08-29 17:10:40 +0200
commit9e8dc741e5fd9a51f4f9413a907f18c395ccf3fd (patch)
treea66ab5c79864cee665a2a12859811a24a4e5acc4 /src/utility/comparators.cpp
parent49f53c07bbc3148543e3141c54ca788d7a981df1 (diff)
browser: make sorting optional
This adds a new option, "noop", to browser_sort_mode. If this mode is selected, no sorting is done in the browser view, and the elements are shown in the same order as received from the MPD server.
Diffstat (limited to 'src/utility/comparators.cpp')
-rw-r--r--src/utility/comparators.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utility/comparators.cpp b/src/utility/comparators.cpp
index 35c5673d..9dd90fa3 100644
--- a/src/utility/comparators.cpp
+++ b/src/utility/comparators.cpp
@@ -78,6 +78,8 @@ bool LocaleBasedItemSorting::operator()(const MPD::Item &a, const MPD::Item &b)
result = m_cmp(a.song->toString(Config.browser_sort_format, Config.tags_separator),
b.song->toString(Config.browser_sort_format, Config.tags_separator));
break;
+ case SortMode::NoOp:
+ throw std::logic_error("can't sort with NoOp sorting mode");
}
break;
}