Quailsnap / WHA-Nametags

An original nametag script for Arma 3 featuring role display, fading, and much more.
GNU General Public License v3.0
5 stars 2 forks source link

Optimisations in nametagGetData #61

Open shadow-fa opened 6 years ago

shadow-fa commented 6 years ago

The construction of the _unitData array doesn't need to use pushBack. https://github.com/Quailsnap/WH-NT/blob/78c95e78756f8282742d7c4e320178e27a688980/wh_nametags.Stratis/wh/nametags/functions/fn_nametagGetData.sqf#L260-L270 To improve performance and readability, we could it change to something like this:

_unitData = [
    _x,
    _entity,
    _name,
    _nameColor,
    _locationData,
    _role,
    _groupName,
    _drawRoleAndGroup,
    _isPassenger,
    _isCommander
];