diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-07-28 17:49:46 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-08-04 11:34:45 -0700 |
commit | 2e1b3325c63cd6c43a10a08acfc54d1fb29a5c03 (patch) | |
tree | bf02e8d37f7ea5ffe28d293ad7bd3b690cc7dae6 /util.h | |
parent | 1b8f1650dc9959ace0df2037f751682e73b5bb1d (diff) |
Warning cleanup
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -29,12 +29,20 @@ buffer_t; /** Returns the larger of two ints */ -int maxi( int a, int b ); +template<typename T> +static inline T maxi( T a, T b ) +{ + return a>b?a:b; +} /** Returns the smaller of two ints */ -int mini( int a, int b ); +template<typename T> +static inline T mini( T a, T b ) +{ + return a<b?a:b; +} /** Compares two wide character strings with an (arguably) intuitive |