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

Make getGroup more robust. Fixes #182 #183

Merged
merged 2 commits into from
Oct 17, 2015
Merged

Make getGroup more robust. Fixes #182 #183

merged 2 commits into from
Oct 17, 2015

Conversation

Killswitch00
Copy link
Contributor

No description provided.


if (toUpper (typeName _this) isEqualTo "GROUP") exitwith {_this};
group _this
params ["_group", grpNull];
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be params [["_group", grpNull]];

Copy link
Contributor

Choose a reason for hiding this comment

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

You may want to consider

params [["_group", grpNull, [grpNull, objNull]]];

That should also provide some validation of the input.

Also, toUpper may not be necessary. typeName returns "GROUP" already. The toUpper may be redundant here.

Killswitch00 added a commit that referenced this pull request Oct 17, 2015
Make getGroup more robust. Fixes #182
@Killswitch00 Killswitch00 merged commit d91297d into master Oct 17, 2015
@Killswitch00 Killswitch00 deleted the SaferGetGroup branch October 30, 2015 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants