1 #ifndef CROMBIE_STOREPARTICLES_H 2 #define CROMBIE_STOREPARTICLES_H 1 23 template<
typename E,
typename T,
typename S =
void*,
typename F =
float>
33 const std::function<F(
const T&)>
compare,
36 for (
auto valid_enum : sorted_enums)
37 store.push_back({valid_enum,
nullptr, {}, {}});
51 void check (
const T& obj, S extra = {}) {
58 for (;it != store.begin(); --it) {
60 if ((result == (it - 1)->result) ||
66 for(
auto* particle = &obj; it != store.end() && particle; ++it) {
67 std::swap(it->particle, particle);
68 std::swap(it->result, result);
69 std::swap(it->extra, extra);