Skip to content

Commit

Permalink
Fix signed/unsigned mismatch warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhuggett committed Jan 5, 2024
1 parent 15d4bee commit 6a1f694
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/iconv/iconv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ void show_diff (std::ostream &os, std::vector<C> const &iconv_out, std::vector<C
auto baby_pos = std::begin (baby_out);
auto ctr = std::size_t{0};

auto const end = iconv_pos + std::min (iconv_out.size (), baby_out.size ());
using difference_type = std::iterator_traits<decltype (iconv_pos)>::difference_type;
auto const end = iconv_pos + static_cast<difference_type> (std::min (iconv_out.size (), baby_out.size ()));
while (iconv_pos != end) {
if (*iconv_pos != *baby_pos) {
os << std::hex << ctr << ": "
Expand Down

0 comments on commit 6a1f694

Please sign in to comment.