[gdal-dev] question on r37621: CSVCompare

Even Rouault even.rouault at spatialys.com
Tue May 9 14:47:43 PDT 2017


On mardi 9 mai 2017 14:19:24 CEST Kurt Schwehr wrote:
> Hi Even,
> 
> A question on https://trac.osgeo.org/gdal/changeset/37621
> 
> Why did you switch the order of the 1st two args with the CSVCompare?
> Looking at the code, it appears to not matter which arg is first.

It does in that case :

    else if( eCriteria == CC_Integer )
    {
        return( CPLGetValueType(pszFieldValue) == CPL_VALUE_INTEGER &&
                atoi(pszFieldValue) == atoi(pszTarget) );
    }

Perhaps we could also test CPLGetValueType(pszTarget) == CPL_VALUE_INTEGER as well for 
symetry (this is assumed that pszTarget is actually a integer when eCriteria == CC_Integer )

> 
> Thanks,
> -kurt


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170509/324b33f9/attachment.html>


More information about the gdal-dev mailing list