[Gdal-dev] build error using Visual Studio 8

Frank Warmerdam warmerdam at pobox.com
Sun Apr 2 20:54:40 EDT 2006


Mateusz Łoskot wrote:
> Frank Warmerdam wrote:
>> Mateusz Łoskot wrote:
>>> The question is how GDAL should handle it. Should GDAL behave more in C
>>> way or more in C++ way?
>> Mateusz,
>>
>> Well, for the specific case of function like strchr() that have "const
>> correct" versions, I think this just helps us write better code.  We should
>> just review any code with problems, and correct it to work properly with
>> VS8.  In the case of the cpl_strtod.cpp change I took the path of least
>> resistance with the cast because the code is complex and I'm afraid of
>> trying to change too much.
> 
> I understand.
> I just would suggest to avoid using C version of strchr in future.

Mateusz,

I don't see why there is a problem with using strchr()?  Just don't assume
it will return a char * on a const char * argument and things will be ok.

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    | President OSGF, http://osgeo.org




More information about the Gdal-dev mailing list