Skip to content

Commit

Permalink
added const qualifier to variables (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
edisonguo authored May 9, 2021
1 parent 5354f53 commit 51e31ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions worker/gdalprocess/warper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ int warp_operation_fast(const char *srcFilePath, char *srcProjRef, double *srcGe
const int iXBlock = iBlock % nXBlocks;
const int iYBlock = iBlock / nXBlocks;

int err = GDALReadBlock(hBand, iXBlock, iYBlock, blockBuf);
const int err = GDALReadBlock(hBand, iXBlock, iYBlock, blockBuf);
if(err != CE_None) continue;
nBlocksRead++;

Expand All @@ -356,11 +356,11 @@ int warp_operation_fast(const char *srcFilePath, char *srcProjRef, double *srcGe
const int iDstX = iDst % dstXSize;
const int iDstY = iDst / dstXSize;

int iXBlockOff = iSrcX % srcXBlockSize;
int iYBlockOff = iSrcY % srcYBlockSize;
int iBlockOff = (iXBlockOff + iYBlockOff * srcXBlockSize) * srcDataSize;
const int iXBlockOff = iSrcX % srcXBlockSize;
const int iYBlockOff = iSrcY % srcYBlockSize;
const int iBlockOff = (iXBlockOff + iYBlockOff * srcXBlockSize) * srcDataSize;

int iDstOff = (iDstY * dstXSize + iDstX) * dataSize;
const int iDstOff = (iDstY * dstXSize + iDstX) * dataSize;
if(supportedDataType) {
memcpy(pDstBuf + iDstOff, blockBuf + iBlockOff, dataSize);
} else {
Expand Down

0 comments on commit 51e31ff

Please sign in to comment.