Skip to content

Commit

Permalink
Fix macOS builds
Browse files Browse the repository at this point in the history
  • Loading branch information
robomics committed Jan 9, 2024
1 parent 4eb6371 commit 48ef784
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ inline ThinPixel<N> PixelSelector::transform_pixel(ThinPixel<float> pixel) const
return float(_reader->avg());
}

const auto i = std::min(bin2 - bin1, expected.size() - 1);
const auto i =
std::min(bin2 - bin1, conditional_static_cast<std::uint64_t>(expected.size() - 1));
return float(expected[i]);
}();

Expand Down Expand Up @@ -693,7 +694,8 @@ inline ThinPixel<N> PixelSelector::iterator<N>::transform_pixel(ThinPixel<float>
return float(_reader->avg());
}

const auto i = std::min(bin2 - bin1, expected.size() - 1);
const auto i =
std::min(bin2 - bin1, conditional_static_cast<std::uint64_t>(expected.size() - 1));
return float(expected[i]);
}();

Expand Down

0 comments on commit 48ef784

Please sign in to comment.