Removed the 'erase_if' template, that was silly

This commit is contained in:
Kayne Ruse
2014-06-14 03:08:33 +10:00
parent fbac14e188
commit 1bc51fe035
2 changed files with 1 additions and 14 deletions
+1 -1
View File
@@ -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;
-13
View File
@@ -32,17 +32,4 @@ std::string to_string_custom(int i);
int to_integer_custom(std::string);
//wow
template<typename ContainerT, typename PredicateT>
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