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:
Rémi Verschelde
2020-05-14 16:41:43 +02:00
parent 07bc4e2f96
commit 0ee0fa42e6
683 changed files with 22803 additions and 12225 deletions

View File

@ -47,8 +47,9 @@ void Environment::set_sky(const Ref<Sky> &p_sky) {
bg_sky = p_sky;
RID sb_rid;
if (bg_sky.is_valid())
if (bg_sky.is_valid()) {
sb_rid = bg_sky->get_rid();
}
RS::get_singleton()->environment_set_sky(environment, sb_rid);
}
@ -504,10 +505,11 @@ bool Environment::is_glow_enabled() const {
void Environment::set_glow_level(int p_level, bool p_enabled) {
ERR_FAIL_INDEX(p_level, RS::MAX_GLOW_LEVELS);
if (p_enabled)
if (p_enabled) {
glow_levels |= (1 << p_level);
else
} else {
glow_levels &= ~(1 << p_level);
}
RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap);
}