From 48ef7844ca68ea02092cb1c1b2cf439fafad45e9 Mon Sep 17 00:00:00 2001 From: Roberto Rossini <71787608+robomics@users.noreply.github.com> Date: Tue, 9 Jan 2024 21:52:59 +0100 Subject: [PATCH] Fix macOS builds --- .../hic/include/hictk/hic/impl/pixel_selector_impl.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libhictk/hic/include/hictk/hic/impl/pixel_selector_impl.hpp b/src/libhictk/hic/include/hictk/hic/impl/pixel_selector_impl.hpp index 9231ec3f..b5f87728 100644 --- a/src/libhictk/hic/include/hictk/hic/impl/pixel_selector_impl.hpp +++ b/src/libhictk/hic/include/hictk/hic/impl/pixel_selector_impl.hpp @@ -124,7 +124,8 @@ inline ThinPixel PixelSelector::transform_pixel(ThinPixel 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(expected.size() - 1)); return float(expected[i]); }(); @@ -693,7 +694,8 @@ inline ThinPixel PixelSelector::iterator::transform_pixel(ThinPixel return float(_reader->avg()); } - const auto i = std::min(bin2 - bin1, expected.size() - 1); + const auto i = + std::min(bin2 - bin1, conditional_static_cast(expected.size() - 1)); return float(expected[i]); }();