From e18d3729398cd09c402e7182ea1f2ff3e2a64227 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Wed, 3 Jun 2009 20:03:26 +0000 Subject: namespace desire, for some things that may conflict svn path=/trunk/; revision=11658 --- desiredata/src/desire.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'desiredata') 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 // 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 static T min(T a, T b) {return a static T max(T a, T b) {return a>b?a:b;} -template T clip(T a, T b, T c) {return std::min(std::max(a,b),c);} +template 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 -- cgit v1.2.1