You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-21 14:57:09 +00:00
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
This commit is contained in:
@@ -37,8 +37,9 @@ float AudioStreamPreview::get_length() const {
|
||||
}
|
||||
|
||||
float AudioStreamPreview::get_max(float p_time, float p_time_next) const {
|
||||
if (length == 0)
|
||||
if (length == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int max = preview.size() / 2;
|
||||
int time_from = p_time / length * max;
|
||||
@@ -63,8 +64,9 @@ float AudioStreamPreview::get_max(float p_time, float p_time_next) const {
|
||||
}
|
||||
|
||||
float AudioStreamPreview::get_min(float p_time, float p_time_next) const {
|
||||
if (length == 0)
|
||||
if (length == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int max = preview.size() / 2;
|
||||
int time_from = p_time / length * max;
|
||||
@@ -194,8 +196,9 @@ Ref<AudioStreamPreview> AudioStreamPreviewGenerator::generate_preview(const Ref<
|
||||
preview->preview->preview = maxmin;
|
||||
preview->preview->length = len_s;
|
||||
|
||||
if (preview->playback.is_valid())
|
||||
if (preview->playback.is_valid()) {
|
||||
preview->thread = Thread::create(_preview_thread, preview);
|
||||
}
|
||||
|
||||
return preview->preview;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user