Skip to content

Commit

Permalink
Merge pull request SimpleITK#1197 from blowekamp/FixSliceBySliceWarning
Browse files Browse the repository at this point in the history
Address signed to unsigned comparison warning
  • Loading branch information
blowekamp authored Sep 16, 2020
2 parents 5e84b2b + b537f2b commit b94e7f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Examples/SliceBySliceDecorator/SliceBySliceDecorator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ struct SliceBySliceDecorator<R(ImageArg, Args...)>
extract_size.begin(), extract_size.begin() + iter_dim));


while (extract_index.back() < image.GetSize().back())
while (static_cast<unsigned int>(extract_index.back()) < image.GetSize().back())
{
extractor.SetIndex(extract_index);

Expand All @@ -100,7 +100,7 @@ struct SliceBySliceDecorator<R(ImageArg, Args...)>
for (unsigned int e = iter_dim; e + 1 < dim; ++e)
{
// if the index element is beyond the size, propagate to next element.
if (extract_index[e] > image.GetSize()[e])
if (static_cast<unsigned int>(extract_index[e]) > image.GetSize()[e])
{
extract_index[e] = 0;
++extract_index[e + 1];
Expand Down

0 comments on commit b94e7f0

Please sign in to comment.