-
Notifications
You must be signed in to change notification settings - Fork 757
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
Improved checking of freed Busses #2993
Conversation
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.
here are just comments, if you like you can follow them or not.
SCClassLibrary/Common/Control/Bus.sc
Outdated
@@ -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, { |
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.
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) { …
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.
Good point. What is the current preferred syntax for if statements? I don't mind making these changes.
SCClassLibrary/Common/Control/Bus.sc
Outdated
@@ -69,11 +70,14 @@ Bus { | |||
["/c_setn", index, values.size] ++ values); | |||
}, { error("Cannot set an audio rate bus") }); |
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.
and while you are at it, you could remove the trailing semicolons: }, { error("Cannot set an audio rate bus") })
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.
I can remove the trailing semicolons np.
can someone label this PR, and also mark it for revisions? |
If there are any more stylistic tweaks to be made, please let me know. |
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.
thank you!
@snappizz I think this is ready for your final approval. |
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.
thanks!
This PR improves checking for nil Busses. It also replaces a call to
.getnMsg
with it's corresponding server message.