forked from mixxxdj/mixxx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WTrackMenu: Filtering: Add a text box for filtering the crates to the…
… crates submenu
- Loading branch information
1 parent
dfe7bc9
commit 5994df2
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#pragma once | ||
|
||
#include <iterator> | ||
|
||
// Reversed iterable to for use in range-for loops. | ||
template<typename T> | ||
struct reverse_iterable { | ||
T& iterable; | ||
}; | ||
|
||
template<typename T> | ||
auto begin(reverse_iterable<T> w) { | ||
return std::rbegin(w.iterable); | ||
} | ||
|
||
template<typename T> | ||
auto end(reverse_iterable<T> w) { | ||
return std::rend(w.iterable); | ||
} | ||
|
||
template<typename T> | ||
reverse_iterable<T> make_reverse_iterable(T&& iterable) { | ||
return {iterable}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters