Skip to content

Commit

Permalink
Microoptimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 16, 2024
1 parent c46ae9b commit a5b4d97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/raster/qgsrasterlayerelevationproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ QgsDoubleRange QgsRasterLayerElevationProperties::elevationRangeForPixelValue( i
if ( band != mBandNumber )
return QgsDoubleRange();

return QgsDoubleRange( pixelValue * mZScale + mZOffset, pixelValue * mZScale + mZOffset );
const double z = pixelValue * mZScale + mZOffset;
return QgsDoubleRange( z, z );
}
}
BUILTIN_UNREACHABLE
Expand Down

0 comments on commit a5b4d97

Please sign in to comment.