summaryrefslogtreecommitdiff
path: root/utility/sorting.hpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-07 12:04:33 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-07 12:04:33 +0000
commit68832526efafb4db60e5627eba6a9051585a4eb9 (patch)
treecb6059828786a60fa10c2017f43b7baf98ca86cc /utility/sorting.hpp
parentLinks have length, ends have entry direction (diff)
downloadilt-68832526efafb4db60e5627eba6a9051585a4eb9.tar.bz2
ilt-68832526efafb4db60e5627eba6a9051585a4eb9.tar.xz
ilt-68832526efafb4db60e5627eba6a9051585a4eb9.zip
Factor a lot of maths and stuff into utility
Diffstat (limited to 'utility/sorting.hpp')
-rw-r--r--utility/sorting.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/utility/sorting.hpp b/utility/sorting.hpp
new file mode 100644
index 0000000..0cb0eaf
--- /dev/null
+++ b/utility/sorting.hpp
@@ -0,0 +1,12 @@
+#ifndef SORTING_H
+#define SORTING_H
+
+template<typename T> struct PtrSorter {
+ bool
+ operator()(const T & a, const T & b) const
+ {
+ return *a < *b;
+ }
+};
+
+#endif