Skip to content

Commit

Permalink
GDALResampleChunk_AverageOrRMS_T(): avoid casting value to type that …
Browse files Browse the repository at this point in the history
…can't hold it (master only)
  • Loading branch information
rouault committed Mar 14, 2024
1 parent d0248bd commit 709169d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gcore/overview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1131,10 +1131,10 @@ static CPLErr GDALResampleChunk_AverageOrRMS_T(
tNoDataValue = 0;
else
tNoDataValue = static_cast<T>(dfNoDataValue);
const T tReplacementVal = static_cast<T>(
bHasNoData ? GDALGetNoDataReplacementValue(
poOverview->GetRasterDataType(), dfNoDataValue)
: dfNoDataValue);
const T tReplacementVal =
bHasNoData ? static_cast<T>(GDALGetNoDataReplacementValue(
poOverview->GetRasterDataType(), dfNoDataValue))
: 0;

int nChunkRightXOff = nChunkXOff + nChunkXSize;
int nChunkBottomYOff = nChunkYOff + nChunkYSize;
Expand Down

0 comments on commit 709169d

Please sign in to comment.