Patch to fix MAX/MIN error introduced in Bug 1305

Frank Warmerdam fwarmerdam at GMAIL.COM
Fri May 13 10:02:25 EDT 2005


On 5/13/05, Daniel Morissette <dmorissette at dmsolutions.ca> wrote:
> Doh! Please disregard the above, I see that this is what the patch does.
> I was mislead because I did a grep of the source and saw a bunch of
> files that use MIN() and MAX() instead of MS_MIN()/MS_MAX()... actually,
> after checking again it seems that all the code that uses MIN() and
> MAX() is raster-related, is it ok to use the MIN() and MAX() macros
> because GDAL defines them?

Daniel, 

I am afraid I have the bad habit of using my customary CPL
macros in GDAL dependent mapserver code.   Technically it works
of course, since code that depends on GDAL will always have them.
However, in theory, for MapServer consistency it would be better if
we stuck to doing things the "mapserver way" even in code depending
on GDAL.  However, I doubt this theorectical improvement is worth
changing the existing code or my personal discomfort. 

What is embarrassing is how hard I find it to use MS_TRUE and
MS_FALSE in code that does not inherit GDAL's TRUE/FALSE definitions.
This is all the harder because on some platforms TRUE and FALSE are
defined everywhere.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-dev mailing list