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

AudioStreamCallback should use references rather than pointers #31

Closed
dturner opened this issue Dec 21, 2017 · 4 comments
Closed

AudioStreamCallback should use references rather than pointers #31

dturner opened this issue Dec 21, 2017 · 4 comments
Assignees
Labels
enhancement P1 high priority

Comments

@dturner
Copy link
Collaborator

dturner commented Dec 21, 2017

No description provided.

@dturner dturner self-assigned this Dec 21, 2017
@philburk philburk added the P1 high priority label Jan 30, 2018
@dturner
Copy link
Collaborator Author

dturner commented Feb 14, 2018

Phil - Why were we doing this again?

@philburk
Copy link
Collaborator

I believe they are preferred when a parameter should never be null. Mikhail?

@mnaganov
Copy link
Collaborator

This what Google C++ style guide suggests: https://google.github.io/styleguide/cppguide.html#Reference_Arguments

References should be used for input parameters (and thus references need to be labelled "const"), unless a null pointer is a valid input parameter value.

Pointers are mostly used for output parameters.

@philburk
Copy link
Collaborator

We decided that because the stream must be modified then we cannot do a const reference. So closing this as Will Not Fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement P1 high priority
Projects
None yet
Development

No branches or pull requests

3 participants