Skip to content

Commit

Permalink
Problem: warning C4244: 'initializing': conversion from 'double' to '…
Browse files Browse the repository at this point in the history
…unsigned int', possible loss of data (#1312)

Solution: add explicit typecasting

Signed-off-by: Juha Reunanen <juha.reunanen@tomaattinen.com>

Signed-off-by: Juha Reunanen <juha.reunanen@tomaattinen.com>
  • Loading branch information
reunanen committed Nov 12, 2022
1 parent 52baef1 commit 7aa8489
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/OpenEXR/ImfInputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ bufferedReadPixels (InputFile::Data* ifd, int scanLine1, int scanLine2)
switch (toSlice.type)
{
case UINT: {
unsigned int fill = toSlice.fillValue;
unsigned int fill = static_cast<unsigned int>(toSlice.fillValue);
for (int x = xStart; x <= levelRange.max.x;
x += toSlice.xSampling)
{
Expand Down

0 comments on commit 7aa8489

Please sign in to comment.