diff --git a/include/boost/histogram/axis/integer.hpp b/include/boost/histogram/axis/integer.hpp index ec15df80..5be85249 100644 --- a/include/boost/histogram/axis/integer.hpp +++ b/include/boost/histogram/axis/integer.hpp @@ -32,16 +32,16 @@ public: /// Returns index and shift (if axis has grown) for the passed argument. auto update(value_type x) noexcept { auto impl = [](auto& der, long x) { - const auto i = x - der.min_; + const axis::index_type i = x - der.min_; if (i >= 0) { - if (i < der.size()) return std::make_pair(static_cast(i), 0); - const auto n = static_cast(i - der.size() + 1); + if (i < der.size()) return std::make_pair(i, 0); + const auto n = i - der.size() + 1; der.size_meta_.first() += n; - return std::make_pair(static_cast(i), -n); + return std::make_pair(i, -n); } der.min_ += i; der.size_meta_.first() -= i; - return std::make_pair(0, static_cast(-i)); + return std::make_pair(0, -i); }; return detail::static_if>(