You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mods (complete and add to the following information):
Arma 3: not applicable
CBA: every version ever
Description:
CBA_fnc_hashSetremoves an entry if the new value equals the default value.
This is cool for a simple key-value store, but leads to unexpected behavior for functions that access the whole dataset, like CBA_fnc_hashEachPair or CBA_fnc_hashKeys.
Agreed with this behaviour being bad. I don't even have an explanation why this would be the case. Premature optimization?
However, this behaviour is legacy. I fear that changing the default of hashSet now would break some (obscure?) things. So if a "clear if value is default" flag is added to hashSet, it should default to true.
Mods (complete and add to the following information):
Description:
CBA_fnc_hashSet
removes an entry if the new value equals the default value.This is cool for a simple key-value store, but leads to unexpected behavior for functions that access the whole dataset, like
CBA_fnc_hashEachPair
orCBA_fnc_hashKeys
.Example:
Expected behavior:
Do not delete values unless user explicitly calls for that.
The text was updated successfully, but these errors were encountered: