Skip to content

Commit

Permalink
Avoid signed/unsigned compare
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Nov 1, 2024
1 parent 591b007 commit da486cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/boost/hash2/digest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ template<std::size_t N> BOOST_CXX14_CONSTEXPR bool operator!=( digest<N> const&

template<std::size_t N> BOOST_CXX14_CONSTEXPR bool to_chars( char* first, char* last, digest<N> const& v ) noexcept
{
if( last - first < 2 * N )
if( last - first < static_cast<std::ptrdiff_t>( 2 * N ) )
{
return false;
}
Expand Down

0 comments on commit da486cc

Please sign in to comment.