diff options
author | N.N. <matju@users.sourceforge.net> | 2009-06-03 20:03:26 +0000 |
---|---|---|
committer | N.N. <matju@users.sourceforge.net> | 2009-06-03 20:03:26 +0000 |
commit | e18d3729398cd09c402e7182ea1f2ff3e2a64227 (patch) | |
tree | 03a05c8d3eaa57d1bef4762e17affcd497bfb729 /desiredata/src | |
parent | 3b2d6a7ce96e5b22f6a8be1ce18ffa9e963dbb7a (diff) |
namespace desire, for some things that may conflict
svn path=/trunk/; revision=11658
Diffstat (limited to 'desiredata/src')
-rw-r--r-- | desiredata/src/desire.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/desiredata/src/desire.h b/desiredata/src/desire.h index 7426a1cb..a6e75e7c 100644 --- a/desiredata/src/desire.h +++ b/desiredata/src/desire.h @@ -641,11 +641,13 @@ void glob_watchdog(t_pd *dummy); #include<iostream> // should I remove min,max now? g++ complains about conflict between min and std::min... // they have the same def. btw i don't know how to refer to my own. +namespace desire { template <class T> static T min(T a, T b) {return a<b?a:b;} template <class T> static T max(T a, T b) {return a>b?a:b;} -template <class T> T clip(T a, T b, T c) {return std::min(std::max(a,b),c);} +template <class T> T clip(T a, T b, T c) {return min(max(a,b),c);} void oprintf(std::ostream &buf, const char *s, ...); void voprintf(std::ostream &buf, const char *s, va_list args); +}; EXTERN std::ostringstream lost_posts; #endif |