-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve some Hash Functions #238
Conversation
}; | ||
_keys set [_forEachIndex, _x select 0]; | ||
_values set [_forEachIndex, _x select 1]; | ||
} forEach _array; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 1.55dev
L38 to L47 can be replaced with:
private _keys = _array apply {_x select 0};
private _values = _array apply {_x select 1};
The suggested code changes result in an error being displayed even as the game is started. Fix the errors and run the CBA hash unit tests and make sure it works. |
|
||
// Work out whether the new value is the default value for this assoc. | ||
_isDefault = [if (isNil "_value") then { nil } else { _value }, | ||
_hash select HASH_DEFAULT_VALUE] call (uiNamespace getVariable "BIS_fnc_areEqual"); | ||
_isDefault = _value isEqualTo _hash select HASH_DEFAULT_VALUE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right.
fix missing brackets
Still fails two unit tests |
This is what I meant previously. The hash functions are not usable in scheduled environment currently. |
|
improve some hash functions
simplfy and cleanup
WIP