diff --git a/stepmania/src/RageUtil.h b/stepmania/src/RageUtil.h index a0e601e5be..8a4617deac 100644 --- a/stepmania/src/RageUtil.h +++ b/stepmania/src/RageUtil.h @@ -266,6 +266,12 @@ int FindIndex( T1 begin, T1 end, const T2 *p ) return iter - begin; } +/* Useful for objects with no operator-, eg. map::iterator (more convenient than advance). */ +template +T Increment( T a ) { ++a; return a; } +template +T Decrement( T a ) { --a; return a; } + void TrimLeft(CString &str, const char *s = "\r\n\t "); void TrimRight(CString &str, const char *s = "\r\n\t "); void StripCrnl(CString &s);