mirror of https://github.com/lukechilds/node.git
Browse Source
Because the final array length is known, it's better to allocate its final length at initialization time to avoid future reallocations. Also add an explicit buffer length greater than 0 comparison so it's more readable, avoids the internal ToBoolean call and follows the standard Node.js API format (as it can be checked in other similar structures where 'length > 0' is preferred over 'length') PR-URL: https://github.com/nodejs/node/pull/11733 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>v7.x
alejandro
8 years ago
committed by
Italo A. Casas
1 changed files with 2 additions and 2 deletions
Loading…
Reference in new issue