diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2014-08-29 17:10:40 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2014-08-29 17:10:40 +0200 |
commit | 9e8dc741e5fd9a51f4f9413a907f18c395ccf3fd (patch) | |
tree | a66ab5c79864cee665a2a12859811a24a4e5acc4 /src/utility/comparators.cpp | |
parent | 49f53c07bbc3148543e3141c54ca788d7a981df1 (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.cpp | 2 |
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; } |