Skip to content

Commit

Permalink
div: Avoid std::memcpy() in normalize()
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Jun 13, 2019
1 parent 9386419 commit 8ee45d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/intx/div.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ inline normalized_div_args<IntT::num_bits> normalize(
}
else
{
un[num_words] = 0;
std::memcpy(un, u, sizeof(numerator));
std::memcpy(vn, v, sizeof(denominator));
na.numerator_ex = 0;
na.numerator = numerator;
na.denominator = denominator;
}

return na;
Expand Down

0 comments on commit 8ee45d1

Please sign in to comment.