From 9cb3bc6dbbb60a4cfb057689cacc2d9e06caabf5 Mon Sep 17 00:00:00 2001 From: dibenedetto Date: Wed, 30 Nov 2005 16:01:25 +0000 Subject: [PATCH] Added std:: namespace for max() and min(). --- vcg/space/index/grid_static_ptr.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vcg/space/index/grid_static_ptr.h b/vcg/space/index/grid_static_ptr.h index 21d95317..3354f8b4 100644 --- a/vcg/space/index/grid_static_ptr.h +++ b/vcg/space/index/grid_static_ptr.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.33 2005/11/30 10:32:44 m_di_benedetto +Added (int) cast to std::distance to prevent compiler warning message. + Revision 1.32 2005/11/10 15:44:17 cignoni Added casts to remove warnings @@ -145,6 +148,7 @@ Initial commit #include #include #include + namespace vcg { /** Static Uniform Grid @@ -263,8 +267,8 @@ namespace vcg { int i,j,x,y; x = p[axis0]; y = p[axis1]; - for(i = max(x-1,0); i <= min( x,siz[axis0]-1);++i) - for(j = max(y-1,0); j <= min( y,siz[axis1]-1);++j){ + for(i = std::max(x-1,0); i <= std::min( x,siz[axis0]-1);++i) + for(j = std::max(y-1,0); j <= std::min( y,siz[axis1]-1);++j){ p[axis0]=i; p[axis1]=j; cl.push_back(Grid(p[0]+siz[0]*(p[1]+siz[1]*p[2])));