You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +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:
@@ -42,8 +42,9 @@ void MultiMeshEditor::_node_removed(Node *p_node) {
|
||||
}
|
||||
|
||||
void MultiMeshEditor::_populate() {
|
||||
if (!node)
|
||||
if (!node) {
|
||||
return;
|
||||
}
|
||||
|
||||
Ref<Mesh> mesh;
|
||||
|
||||
@@ -141,8 +142,9 @@ void MultiMeshEditor::_populate() {
|
||||
Map<float, int> triangle_area_map;
|
||||
for (int i = 0; i < facecount; i++) {
|
||||
float area = r[i].get_area();
|
||||
if (area < CMP_EPSILON)
|
||||
if (area < CMP_EPSILON) {
|
||||
continue;
|
||||
}
|
||||
triangle_area_map[area_accum] = i;
|
||||
area_accum += area;
|
||||
}
|
||||
@@ -214,10 +216,11 @@ void MultiMeshEditor::_populate() {
|
||||
void MultiMeshEditor::_browsed(const NodePath &p_path) {
|
||||
NodePath path = node->get_path_to(get_node(p_path));
|
||||
|
||||
if (browsing_source)
|
||||
if (browsing_source) {
|
||||
mesh_source->set_text(path);
|
||||
else
|
||||
} else {
|
||||
surface_source->set_text(path);
|
||||
}
|
||||
}
|
||||
|
||||
void MultiMeshEditor::_menu_option(int p_option) {
|
||||
@@ -249,10 +252,11 @@ void MultiMeshEditor::_browse(bool p_source) {
|
||||
browsing_source = p_source;
|
||||
std->get_scene_tree()->set_marked(node, false);
|
||||
std->popup_centered_ratio();
|
||||
if (p_source)
|
||||
if (p_source) {
|
||||
std->set_title(TTR("Select a Source Mesh:"));
|
||||
else
|
||||
} else {
|
||||
std->set_title(TTR("Select a Target Surface:"));
|
||||
}
|
||||
}
|
||||
|
||||
void MultiMeshEditor::_bind_methods() {
|
||||
|
||||
Reference in New Issue
Block a user