Skip to content

Conversation

@jjuhl
Copy link
Contributor

@jjuhl jjuhl commented Dec 18, 2025

Some small fixes. Nothing super important. Feel free to just cherry-pick commits if you don't like all of them. Feedback is welcome if the commits are not wanted.
Kind regards,
Jesper Juhl

std::endl is equivalent to outputing a newline followed by
std::flush. But when writing to std::cerr (which is unbuffered) the
flush is not needed and is just extra work for no gain - so change
std::endl to '\n' in such cases.
The function itself returns void as does the function called in the
retun statement, so there's no bug here, just a small passibility of
confusion. When you return something you expect a value to be
returned, which is not the case here, so just call the function and
let that be it.
Const correctness makes code easier to reason about when reading it
and (potentially) prevents accidental errors when modifying it in the
future, so make a number of variables that are not modified const.
@texus
Copy link
Owner

texus commented Dec 21, 2025

Thanks.
The changes themselves are all good, but there were some unrelated style changes that I didn't like (e.g. disconnectCallback becoming one line). So I ended up manually merging this and amending the commits to undo the style changes. The changes have been commited in b3975b4, d5b77f0, 821679d and 821679d

@texus texus closed this Dec 21, 2025
@jjuhl
Copy link
Contributor Author

jjuhl commented Dec 21, 2025

Thank you for merging this.
Sorry about the style changes, I'll be more careful about that in the future.

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.

2 participants