-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Tidy and modernize SampleBuffer #11987
Conversation
Welcome at Mixxx! |
Thank you! |
Regarding the code style issues, we recommend to install pre-commit locally: https://github.com/mixxxdj/mixxx/wiki/Using-Git#set-up-automatic-code-checking |
f273a11
to
b81df8f
Compare
Unfortunately archlinux doesn't have yet the required version of pre-commit, so I'll use the patch for now. |
Which pre-commit version do you have? Did you try to Install pre-commit via pip? If you configure you IDE for clang-fotmat, make sure to reformat only touched lines! |
1a083b6
to
2b65761
Compare
2b65761
to
b9f47e9
Compare
b9f47e9
to
2a3ad36
Compare
Archlinux has the x.20.x instead of the x.21.x and I've tried pip, but it wanted a system wide install, etc... so I didn't want to go that far. |
2a3ad36
to
a9f12d1
Compare
have you tried installing pre-commit via pip in a venv? |
No, I'm short on disk space and I don't want to start hacking my system. |
Thats fine too, as long as you're fine with applying the pre-commit patches from CI for now. I'm confused why its not newer though. pre-commit 2.20.0 has been released more than a year ago and arch is a rolling distro, right? so it should've been picked up by now if there is not technical reason why it couldn't. |
It is because the maintainer is probably lacking time to update the package. |
Thank you. Can you please ensure pre-commit passes now? If you don't want / can't install it, you can find a patch file generated by CI in the pre-commit job. In this case https://github.com/mixxxdj/mixxx/actions/runs/6208187984 |
50e9408
to
2f82efb
Compare
Yes I did apply this patch. However, it feels weird how much it indents the clobber list, feels like it has 1 extra level of indentation. |
I assume you mean |
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.
LGTM. Thank you. Your contributions are highly appreciated. waiting for LGTM from @daschuer
2f82efb
to
d10e8c3
Compare
d10e8c3
to
1b29697
Compare
SampleBuffer() | ||
: m_data(nullptr), | ||
m_size(0) { | ||
constexpr SampleBuffer() |
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.
constexpr SampleBuffer() | |
constexpr SampleBuffer() noexcept |
: m_data(std::exchange(that.m_data, nullptr)), | ||
m_size(std::exchange(that.m_size, 0)) { | ||
} | ||
~SampleBuffer() { |
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.
TIL destructors are noexcept
by default since C++11, so even if we don't add it here, the destructor would std::terminate
be default if SampleUtil::free
would panic.
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.
We have now refined our rules regarding noexcept in https://github.com/mixxxdj/mixxx/wiki/Coding-Guidelines#specifier-nexecept.
So here we have some extra noexecpt now. I will merge this anyway, because this PR has been started before. We can fix the style later.
Thank you @abique for the work!
Hi, Thanks for merging! Sorry for all the noise with the annotations. Cheers, |
Just wanted to let you know that I reached out to the package maintainer. The package was updated now. |
Yes I've seen that, thanks! |
No description provided.