[Gdal-dev] gcore\gdal_rat.cpp typo and logical errors

Frank Warmerdam warmerdam at pobox.com
Fri Jun 29 10:12:05 EDT 2007


Lucena, Ivan wrote:
> Hi there,
> 
> #1 - There is a missing "h" at:
> 
> "In the general case each row as a column indicating the minimum pixel"
> 
> [http://trac.osgeo.org/gdal/browser/trunk/gdal/gcore/gdal_rat.cpp#L54]
> 
> It looks like someone is imitating my writing style :-), but I guess 
> that the fix would be:
> 
> "In the general case each row has a column indicating the minimum pixel"
> 
> #2 - And a missing variable assignment to the returning value of a 
> function call at:
> 
> 1239             if( iMaxCol == -1 )
> 1240                 GetColOfUsage( GFU_MinMax );
>                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> [http://trac.osgeo.org/gdal/browser/trunk/gdal/gcore/gdal_rat.cpp#L1240]
> 
> The fix is probably something like that:
> 
> 1236             int  iMaxCol;
> 1237    
> 1238             iMaxCol = GetColOfUsage( GFU_Max );
> 1239             if( iMaxCol == -1 )
> 1240                 iMaxCol = GetColOfUsage( GFU_MinMax );
>                     ^^^^^^^^^^
> 1241    
> 1242             if( iMaxCol == -1 || nRowCount == 0 )
> 1243                 return NULL;
> 
> I would be happy to commit it if that is OK.

Ivan,

Yes, you are correct on both points.  I committed the changes
before reading your last line so no need to do so.

Thanks!
-- 
---------------------------------------+--------------------------------------
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 OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list