Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: avoid casting std::trunc(... / ...) to size_t
Given that the divisor is not zero, the result of dividing unsigned integers is an unsigned integer that is always rounded down, i.e., there is no need to call std::trunc(). Doing so unnecessarily yields a floating-point number, requiring the result to be cast to an unsigned integer again. PR-URL: #44467 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
- Loading branch information