From f4940d9344566ee4db4d3ca0adc367fa1f3427e2 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Wed, 28 Sep 2022 09:40:05 +0200 Subject: [PATCH] avoided ugly casts in table_iterator::increment --- include/boost/unordered/detail/foa.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/unordered/detail/foa.hpp b/include/boost/unordered/detail/foa.hpp index bca20d8a..6bcc2b45 100644 --- a/include/boost/unordered/detail/foa.hpp +++ b/include/boost/unordered/detail/foa.hpp @@ -340,7 +340,8 @@ private: } else{ pc+=n; - p+=static_cast(n)-static_cast(n0); + p-=n0; + p+=n; } } @@ -701,7 +702,8 @@ private: static constexpr dummy_group_layout storage[2]={group_type::dummy_group,group_type::dummy_group}; - return reinterpret_cast(const_cast(storage)); + return reinterpret_cast( + const_cast(storage)); } void delete_arrays(const arrays_info& arrays_)noexcept