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

CI: Update clang-format pre-commit hook to 19.1.0 #97483

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

akien-mga
Copy link
Member

No description provided.

@@ -48,9 +48,9 @@ Error AudioDriverXAudio2::init() {
int latency = Engine::get_singleton()->get_audio_output_latency();
buffer_size = closest_power_of_2(latency * mix_rate / 1000);

samples_in = memnew_arr(int32_t, buffer_size * channels);
samples_in = memnew_arr(int32_t, size_t(buffer_size) * channels);
Copy link
Member Author

Choose a reason for hiding this comment

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

This was needed to prevent it from becoming:

Suggested change
samples_in = memnew_arr(int32_t, size_t(buffer_size) * channels);
samples_in = memnew_arr(int32_t, buffer_size *channels);

That's a bug, but it's understandable that it gets confused. memnew_arr is a macro and it literally takes a type as first parameter, but the second parameter should be a size_t int.

Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

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

LGTM and the workarounds aren't obtrusive

@akien-mga akien-mga merged commit a4c1804 into godotengine:master Sep 26, 2024
19 checks passed
@akien-mga akien-mga deleted the clang-format-19.1.0 branch September 26, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants