You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +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:
@@ -36,8 +36,9 @@ float AudioStreamPreview::get_length() const {
|
||||
return length;
|
||||
}
|
||||
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;
|
||||
@@ -61,8 +62,9 @@ float AudioStreamPreview::get_max(float p_time, float p_time_next) const {
|
||||
return (vmax / 255.0) * 2.0 - 1.0;
|
||||
}
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user