mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11: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:
parent
b8d198eeed
commit
140350d767
694 changed files with 23283 additions and 12499 deletions
|
|
@ -52,8 +52,9 @@ void OpenSimplexNoise::_init_seeds() {
|
|||
}
|
||||
|
||||
void OpenSimplexNoise::set_seed(int p_seed) {
|
||||
if (seed == p_seed)
|
||||
if (seed == p_seed) {
|
||||
return;
|
||||
}
|
||||
|
||||
seed = p_seed;
|
||||
|
||||
|
|
@ -67,8 +68,9 @@ int OpenSimplexNoise::get_seed() const {
|
|||
}
|
||||
|
||||
void OpenSimplexNoise::set_octaves(int p_octaves) {
|
||||
if (p_octaves == octaves)
|
||||
if (p_octaves == octaves) {
|
||||
return;
|
||||
}
|
||||
|
||||
ERR_FAIL_COND_MSG(p_octaves > MAX_OCTAVES, vformat("The number of OpenSimplexNoise octaves is limited to %d; ignoring the new value.", MAX_OCTAVES));
|
||||
|
||||
|
|
@ -77,22 +79,25 @@ void OpenSimplexNoise::set_octaves(int p_octaves) {
|
|||
}
|
||||
|
||||
void OpenSimplexNoise::set_period(float p_period) {
|
||||
if (p_period == period)
|
||||
if (p_period == period) {
|
||||
return;
|
||||
}
|
||||
period = p_period;
|
||||
emit_changed();
|
||||
}
|
||||
|
||||
void OpenSimplexNoise::set_persistence(float p_persistence) {
|
||||
if (p_persistence == persistence)
|
||||
if (p_persistence == persistence) {
|
||||
return;
|
||||
}
|
||||
persistence = p_persistence;
|
||||
emit_changed();
|
||||
}
|
||||
|
||||
void OpenSimplexNoise::set_lacunarity(float p_lacunarity) {
|
||||
if (p_lacunarity == lacunarity)
|
||||
if (p_lacunarity == lacunarity) {
|
||||
return;
|
||||
}
|
||||
lacunarity = p_lacunarity;
|
||||
emit_changed();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue