Opened 20 years ago

Last modified 20 years ago

#539 closed defect (fixed)

GDALRasterBlock::IsCached seems to ignore which band it belongs to

Reported by: daniel112@… Owned by: dron
Priority: high Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc:

Description

I was just browsing through some of the caching code and thought that
GDALRasterBlock::IsCached looked a little bit odd, since it doesn't look at what
band it belongs to or did I missunderstand something?

Change History (2)

comment:1 by warmerdam, 20 years ago

Andrey,

I'm not sure where GDALRasterBlock::IsCached() is used, but I think Daniel 
is right.  It tests based on the block offsets but it doesn't check whether
the cached block is for the correct dataset.  Is this really what you want? 
Where is this method used? 


comment:2 by dron, 20 years ago

Well... It is my fault and I don't know how it happens. The function
GDALRasterBlock::IsCached() does nothing useful and I don't know why it was
implemented in such way (probably it was too late night or something like). I
have removed that function and replaced it with the
GDALRasterBand::IsBlockCached(). It is used in the RawRasterBand::IRasterIO()
logic to decide whether we should use the direct or cached I/O. That was the
purpose of the IsCached() function in the first place.

Sorry about that.
Note: See TracTickets for help on using tickets.