Skip to content
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

add CBA_fnc_hashValues #1350

Merged
merged 2 commits into from
Oct 13, 2020
Merged

add CBA_fnc_hashValues #1350

merged 2 commits into from
Oct 13, 2020

Conversation

Fusselwurm
Copy link
Contributor

@Fusselwurm Fusselwurm commented Jul 5, 2020

There is a hashKeys function - but the corresponding function hashValues is missing

There is a `hashKeys` function  - but the corresponding `hashValues` is missing
@Fusselwurm Fusselwurm changed the title Create fnc_hashValues.sqf add CBA_fnc_hashValues Jul 5, 2020
@Fusselwurm Fusselwurm marked this pull request as ready for review July 5, 2020 22:14
@veteran29 veteran29 added this to the 3.15.2 milestone Jul 6, 2020
@commy2
Copy link
Contributor

commy2 commented Oct 13, 2020

Now it does a deep copy.

private _names = [] call CBA_fnc_hashCreate;  
[_names, "super", [1,2,3]] call CBA_fnc_hashSet;  
  
{  
    _x pushBack 4;  
} forEach ([_names] call CBA_fnc_hashValues);  
  
[_names, "super"] call CBA_fnc_hashGet // got [1,2,3], expected [1,2,3,4]

while:

private _names = [] call CBA_fnc_hashCreate; 
[_names, "super", [1,2,3]] call CBA_fnc_hashSet; 
 
([_names, "super"] call CBA_fnc_hashGet) pushBack 4; 
 
[_names, "super"] call CBA_fnc_hashGet // got [1,2,3,4]

// -----------------------------------------------------------------------------
params [["_hash", [[], []], [[]]]];

+(_hash select HASH_VALUES)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[] + (_hash select HASH_VALUES)

as described.

@Fusselwurm Fusselwurm deleted the patch-1 branch November 19, 2020 20:06
Fusselwurm added a commit to gruppe-adler/TvT_Template.VR that referenced this pull request Nov 19, 2020
remove unnecessary implementation of CBA_fnc_hashValues , see CBATeam/CBA_A3#1350 which has been merged & released with CBA-3.15.2
Fusselwurm added a commit to gruppe-adler/gruppe_adler_mod that referenced this pull request Nov 19, 2020
remove unnecessary implementation of CBA_fnc_hashValues , see CBATeam/CBA_A3#1350 which has been merged & released with CBA-3.15.2
Fusselwurm added a commit to gruppe-adler/TvT_Template.VR that referenced this pull request Nov 24, 2020
remove unnecessary implementation of CBA_fnc_hashValues , see CBATeam/CBA_A3#1350 which has been merged & released with CBA-3.15.2
Fusselwurm added a commit to gruppe-adler/grad_animalTransport that referenced this pull request Mar 26, 2021
remove unnecessary implementation of CBA_fnc_hashValues , see CBATeam/CBA_A3#1350 which has been merged & released with CBA-3.15.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants