Skip to content

Commit

Permalink
Fix warnings in multipartExamples.cpp (AcademySoftwareFoundation#1533)
Browse files Browse the repository at this point in the history
* Fix warnings in multipartExamples.cpp

Signed-off-by: Cary Phillips <cary@ilm.com>

* fix indentation

Signed-off-by: Cary Phillips <cary@ilm.com>

---------

Signed-off-by: Cary Phillips <cary@ilm.com>
  • Loading branch information
cary-ilm committed Sep 23, 2023
1 parent 7b80467 commit 0650cd2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/examples/multipartExamples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void combineFiles ()

const char * filenames[] = {"gz1.exr", "tiledgz1.exr", "test.deep.exr", "testTiled.deep.exr"};

for (int i = 0; i < sizeof (filenames) / sizeof (filenames[0]); i++)
for (size_t i = 0; i < sizeof (filenames) / sizeof (filenames[0]); i++)
{
MultiPartInputFile * in_file = new MultiPartInputFile (filenames[i]);
Header header = in_file->header (0);
Expand All @@ -112,7 +112,7 @@ void combineFiles ()

MultiPartOutputFile outputFile ("multipart.exr", headers.data (), (int)headers.size ());

for (int i = 0; i < sizeof (filenames) / sizeof (filenames[0]); i++)
for (size_t i = 0; i < sizeof (filenames) / sizeof (filenames[0]); i++)
{
Header & header = headers[i];
const string& type = header.type ();
Expand Down Expand Up @@ -351,8 +351,8 @@ void modifyDeepChannels(Array2D<uint32_t> & sampleCount, list<Array2D<T *>> & ch
for (int x = 0; x < channel.width (); x++)
{
uint32_t count = sampleCount[y][x];
for (int j = 0; j < count; j++)
channel[y][x][j] += delta;
for (uint32_t j = 0; j < count; j++)
channel[y][x][j] += delta;
}
}
}
Expand Down Expand Up @@ -414,7 +414,7 @@ void modifyMultipart ()
Box2i dataWindow = header.dataWindow ();
OutputPart outputPart (outputFile, i);
outputPart.setFrameBuffer (frameBuffer);
outputPart.writePixels (header.dataWindow ().max.y - header.dataWindow ().min.y + 1);
outputPart.writePixels (dataWindow.max.y - dataWindow.min.y + 1);
}
else
{
Expand Down Expand Up @@ -466,7 +466,7 @@ void modifyMultipart ()
Box2i dataWindow = header.dataWindow ();
DeepScanLineOutputPart outputPart (outputFile, i);
outputPart.setFrameBuffer (frameBuffer);
outputPart.writePixels (header.dataWindow ().max.y - header.dataWindow ().min.y + 1);
outputPart.writePixels (dataWindow.max.y - dataWindow.min.y + 1);
}
else
{
Expand Down

0 comments on commit 0650cd2

Please sign in to comment.