diff options
author | Tobias Nießen <tniessen@tnie.de> | 2022-09-01 12:42:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-01 10:42:33 +0000 |
commit | 8524793ebfa1d24a0f3557af4fd3d0a8955f63b0 (patch) | |
tree | c35fa4024860364390167f73d41b044f182babde /deps/npm/node_modules/diff/lib/patch | |
parent | 4f6f90f536b93f02a39d86cad7747a189e81c1c3 (diff) | |
download | node-new-8524793ebfa1d24a0f3557af4fd3d0a8955f63b0.tar.gz |
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: https://github.com/nodejs/node/pull/44467
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'deps/npm/node_modules/diff/lib/patch')
0 files changed, 0 insertions, 0 deletions