Navigation Menu

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

private keyword #204

Merged
merged 3 commits into from Dec 2, 2015
Merged

private keyword #204

merged 3 commits into from Dec 2, 2015

Conversation

commy2
Copy link
Contributor

@commy2 commy2 commented Nov 23, 2015

requires 1.54 and #203

@commy2 commy2 added the Bug Fix label Nov 23, 2015
@commy2 commy2 changed the title Privatekeyword154 private keyword Nov 23, 2015
if (!IS_ARRAY(_this)) exitWith {nil};
if (_this isEqualTo []) exitWith {nil};

params ["_min"];
_index = 0;

private _index = 0;

{
if (isNil "_x" || {(typeName _x) != (typeName 0)}) exitWith {_max = nil; _index = nil;};
Copy link
Contributor

Choose a reason for hiding this comment

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

Noticed a bug here: _max should be _min here (and in the last isNil check in the file aswell)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The function doesn't work at all, because a few lines below it does:
if (isNil "_max") exitWith {nil};
with _max never being defined (or carried over from another function due to missing private)

fixed in: #207

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, that's what I referred to with "and in the last isNil check in the file aswell". Good to see the separate PR with the fix. I'll review them ASAP.

@commy2 commy2 added Enhancement and removed Bug Fix labels Dec 2, 2015
Killswitch00 added a commit that referenced this pull request Dec 2, 2015
@Killswitch00 Killswitch00 merged commit b642fb0 into CBATeam:master Dec 2, 2015
@Killswitch00 Killswitch00 added this to the 2.2.1 milestone Dec 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants