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 <[email protected]> Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
- Loading branch information