From 5a0b3927a33807cca4c77c40eb873f8a3b51b0b0 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 29 Apr 2023 19:07:11 +0100 Subject: Drop .hpp for header only things Half of them acquired a .cpp part anyway --- lib/sorting.hpp | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 lib/sorting.hpp (limited to 'lib/sorting.hpp') diff --git a/lib/sorting.hpp b/lib/sorting.hpp deleted file mode 100644 index 777de00..0000000 --- a/lib/sorting.hpp +++ /dev/null @@ -1,49 +0,0 @@ -#pragma once - -#include -#include - -template struct PtrSorter { - bool - operator()(const T & a, const T & b) const - { - return *a < *b; - } -}; - -template struct PtrMemberSorter : public PtrSorter { - using MT = std::decay_t; - using is_transparent = MT; - - using PtrSorter::operator(); - - bool - operator()(const MT & a, const T & b) const - { - return a < (*b).*M; - } - - bool - operator()(const T & a, const MT & b) const - { - return (*a).*M < b; - } -}; - -struct CompareBy { - glm::length_t index; - - template - auto - operator()(const T & a, const T & b) const - { - return get(a) < get(b); - } - - template - auto - get(const T & a) const - { - return a[index]; - } -}; -- cgit v1.2.3