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

Improved checking of freed Busses #2993

Merged
merged 3 commits into from
Jun 27, 2017

Conversation

patrickdupuis
Copy link
Contributor

This PR improves checking for nil Busses. It also replaces a call to .getnMsg with it's corresponding server message.

Copy link
Member

@telephon telephon left a comment

Choose a reason for hiding this comment

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

here are just comments, if you like you can follow them or not.

@@ -55,6 +55,7 @@ Bus {
}

setMsg { arg ... values;
if(index.isNil) { Error("Cannot construct a % for a % that has been freed".format(thisMethod.name, this.class.name)).throw };
if(this.isSettable, {
Copy link
Member

Choose a reason for hiding this comment

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

it would be good if you keep the same formatting convention in the whole document. So maybe if you like you could change if(this.isSettable, { … to if(this.isSettable) { …

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. What is the current preferred syntax for if statements? I don't mind making these changes.

@@ -69,11 +70,14 @@ Bus {
["/c_setn", index, values.size] ++ values);
}, { error("Cannot set an audio rate bus") });
Copy link
Member

Choose a reason for hiding this comment

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

and while you are at it, you could remove the trailing semicolons: }, { error("Cannot set an audio rate bus") })

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can remove the trailing semicolons np.

@patrickdupuis
Copy link
Contributor Author

can someone label this PR, and also mark it for revisions?

@nhthn nhthn added the comp: class library SC class library label Jun 25, 2017
@nhthn nhthn added this to the 3.9 milestone Jun 25, 2017
@patrickdupuis
Copy link
Contributor Author

If there are any more stylistic tweaks to be made, please let me know.

Copy link
Member

@telephon telephon left a comment

Choose a reason for hiding this comment

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

thank you!

@patrickdupuis
Copy link
Contributor Author

@snappizz I think this is ready for your final approval.

@nhthn nhthn self-assigned this Jun 26, 2017
Copy link
Contributor

@nhthn nhthn left a comment

Choose a reason for hiding this comment

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

thanks!

@nhthn nhthn merged commit bb14437 into supercollider:master Jun 27, 2017
@patrickdupuis patrickdupuis deleted the topic/improve-bus-checks branch June 27, 2017 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: class library SC class library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants