From 640bd48f511059214124ed7d04d69bef1d859ab8 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 2 Feb 2023 04:54:10 +0200 Subject: [PATCH] Avoid -Wconversion warning for p[x1] --- include/boost/container_hash/detail/hash_range.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/container_hash/detail/hash_range.hpp b/include/boost/container_hash/detail/hash_range.hpp index 930ee22..6df98c1 100644 --- a/include/boost/container_hash/detail/hash_range.hpp +++ b/include/boost/container_hash/detail/hash_range.hpp @@ -125,9 +125,9 @@ std::size_t>::type std::size_t const x2 = n >> 1; // 1: 0, 2: 1, 3: 1 v1 = - static_cast( static_cast( p[ x1 ] ) ) << x1 * 8 | - static_cast( static_cast( p[ x2 ] ) ) << x2 * 8 | - static_cast( static_cast( p[ 0 ] ) ); + static_cast( static_cast( p[ static_cast( x1 ) ] ) ) << x1 * 8 | + static_cast( static_cast( p[ static_cast( x2 ) ] ) ) << x2 * 8 | + static_cast( static_cast( p[ 0 ] ) ); } w += q;