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

Solution: add explicit typecasting
  • Loading branch information
reunanen committed Nov 10, 2022
1 parent 60b9bf9 commit a122bf4
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 a122bf4

Please sign in to comment.