diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2021-04-05 14:09:59 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-04-05 14:09:59 +0200 |
commit | d83761ba80b90e17aaefaa83c7ece0fa89511266 (patch) | |
tree | 39544b604c8be6cf6daa56a2a7774426d394c2a3 /scene/resources | |
parent | 9bbe51dc279e1203962bdf0b3266c9b14307638c (diff) |
Style: Apply clang-tidy's `readability-braces-around-statements`
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/text_paragraph.cpp | 6 | ||||
-rw-r--r-- | scene/resources/visual_shader_nodes.cpp | 20 |
2 files changed, 16 insertions, 10 deletions
diff --git a/scene/resources/text_paragraph.cpp b/scene/resources/text_paragraph.cpp index 012d36cc35..341f5abd80 100644 --- a/scene/resources/text_paragraph.cpp +++ b/scene/resources/text_paragraph.cpp @@ -620,11 +620,13 @@ int TextParagraph::hit_test(const Point2 &p_coords) const { const_cast<TextParagraph *>(this)->_shape_lines(); Vector2 ofs; if (TS->shaped_text_get_orientation(rid) == TextServer::ORIENTATION_HORIZONTAL) { - if (ofs.y < 0) + if (ofs.y < 0) { return 0; + } } else { - if (ofs.x < 0) + if (ofs.x < 0) { return 0; + } } for (int i = 0; i < lines.size(); i++) { if (TS->shaped_text_get_orientation(lines[i]) == TextServer::ORIENTATION_HORIZONTAL) { diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp index 9c8d2a0981..7943b95177 100644 --- a/scene/resources/visual_shader_nodes.cpp +++ b/scene/resources/visual_shader_nodes.cpp @@ -4660,16 +4660,18 @@ String VisualShaderNodeTexture2DArrayUniform::generate_global(Shader::Mode p_mod switch (texture_type) { case TYPE_DATA: - if (color_default == COLOR_DEFAULT_BLACK) + if (color_default == COLOR_DEFAULT_BLACK) { code += " : hint_black;\n"; - else + } else { code += ";\n"; + } break; case TYPE_COLOR: - if (color_default == COLOR_DEFAULT_BLACK) + if (color_default == COLOR_DEFAULT_BLACK) { code += " : hint_black_albedo;\n"; - else + } else { code += " : hint_albedo;\n"; + } break; case TYPE_NORMAL_MAP: code += " : hint_normal;\n"; @@ -4728,16 +4730,18 @@ String VisualShaderNodeTexture3DUniform::generate_global(Shader::Mode p_mode, Vi switch (texture_type) { case TYPE_DATA: - if (color_default == COLOR_DEFAULT_BLACK) + if (color_default == COLOR_DEFAULT_BLACK) { code += " : hint_black;\n"; - else + } else { code += ";\n"; + } break; case TYPE_COLOR: - if (color_default == COLOR_DEFAULT_BLACK) + if (color_default == COLOR_DEFAULT_BLACK) { code += " : hint_black_albedo;\n"; - else + } else { code += " : hint_albedo;\n"; + } break; case TYPE_NORMAL_MAP: code += " : hint_normal;\n"; |