[gdal-dev] question on r37621: CSVCompare

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] question on r37621: CSVCompare

Kurt Schwehr-2
Hi Even,


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.

Thanks,
-kurt

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: question on r37621: CSVCompare

Even Rouault-2

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


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev