From e956e80c1fa1cc8aefcb1533e5acf5cf3c8ffdd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 10 May 2020 12:56:01 +0200 Subject: Style: clang-format: Disable AllowShortIfStatementsOnASingleLine Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet. --- scene/main/canvas_item.h | 6 ++++-- scene/main/scene_tree.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'scene/main') diff --git a/scene/main/canvas_item.h b/scene/main/canvas_item.h index dc17c5283b..5f1798cc2a 100644 --- a/scene/main/canvas_item.h +++ b/scene/main/canvas_item.h @@ -247,9 +247,11 @@ private: protected: _FORCE_INLINE_ void _notify_transform() { - if (!is_inside_tree()) return; + if (!is_inside_tree()) + return; _notify_transform(this); - if (!block_transform_notify && notify_local_transform) notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED); + if (!block_transform_notify && notify_local_transform) + notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED); } void item_rect_changed(bool p_size_changed = true); diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 7afc1b2edd..94be22ccd2 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1372,7 +1372,8 @@ void SceneTree::get_argument_options(const StringName &p_function, int p_idx, Li SceneTree::SceneTree() { - if (singleton == nullptr) singleton = this; + if (singleton == nullptr) + singleton = this; _quit = false; accept_quit = true; quit_on_go_back = true; @@ -1478,5 +1479,6 @@ SceneTree::~SceneTree() { memdelete(root); } - if (singleton == this) singleton = nullptr; + if (singleton == this) + singleton = nullptr; } -- cgit v1.2.3