From 1bc51fe0351b7013b8911643b7aa7f0d20a16b75 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sat, 14 Jun 2014 03:08:33 +1000 Subject: [PATCH] Removed the 'erase_if' template, that was silly --- common/utilities/utility.cpp | 2 +- common/utilities/utility.hpp | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/common/utilities/utility.cpp b/common/utilities/utility.cpp index 75871b4..a8a7270 100644 --- a/common/utilities/utility.cpp +++ b/common/utilities/utility.cpp @@ -26,7 +26,7 @@ int snapToBase(int base, int x) { //snap to a grid if (x < 0) { - x++; + ++x; return x / base * base - base; } return x / base * base; diff --git a/common/utilities/utility.hpp b/common/utilities/utility.hpp index aea01ef..3589c01 100644 --- a/common/utilities/utility.hpp +++ b/common/utilities/utility.hpp @@ -32,17 +32,4 @@ std::string to_string_custom(int i); int to_integer_custom(std::string); -//wow -template -void erase_if(ContainerT& items, const PredicateT& predicate) { - for(auto it = items.begin(); it != items.end(); /* empty */) { - if(predicate(*it)) { - it = items.erase(it); - } - else { - ++it; - } - } -}; - #endif