diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-05-14 23:09:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 23:09:03 +0200 |
commit | 00949f0c5fcc6a4f8382a4a97d5591fd9ec380f8 (patch) | |
tree | 2b1c31f45add24085b64425ce440f577424c16a1 /scene/3d/xr_nodes.cpp | |
parent | 5046f666a1181675b39f156c38346525dc1c444e (diff) | |
parent | 0ee0fa42e6639b6fa474b7cf6afc6b1a78142185 (diff) |
Merge pull request #38738 from akien-mga/cause-we-never-go-out-of-style
Style: Remove new line at block start, enforce line between functions, enforce braces in if and loop blocks
Diffstat (limited to 'scene/3d/xr_nodes.cpp')
-rw-r--r-- | scene/3d/xr_nodes.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp index 1b13b64744..f9f6b6905c 100644 --- a/scene/3d/xr_nodes.cpp +++ b/scene/3d/xr_nodes.cpp @@ -55,8 +55,9 @@ void XRCamera3D::_notification(int p_what) { }; String XRCamera3D::get_configuration_warning() const { - if (!is_visible() || !is_inside_tree()) + if (!is_visible() || !is_inside_tree()) { return String(); + } // must be child node of XROrigin3D! XROrigin3D *origin = Object::cast_to<XROrigin3D>(get_parent()); @@ -364,8 +365,9 @@ XRPositionalTracker::TrackerHand XRController3D::get_hand() const { }; String XRController3D::get_configuration_warning() const { - if (!is_visible() || !is_inside_tree()) + if (!is_visible() || !is_inside_tree()) { return String(); + } // must be child node of XROrigin! XROrigin3D *origin = Object::cast_to<XROrigin3D>(get_parent()); @@ -443,7 +445,6 @@ void XRAnchor3D::_notification(int p_what) { }; void XRAnchor3D::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_anchor_id", "anchor_id"), &XRAnchor3D::set_anchor_id); ClassDB::bind_method(D_METHOD("get_anchor_id"), &XRAnchor3D::get_anchor_id); ADD_PROPERTY(PropertyInfo(Variant::INT, "anchor_id", PROPERTY_HINT_RANGE, "0,32,1"), "set_anchor_id", "get_anchor_id"); @@ -491,8 +492,9 @@ bool XRAnchor3D::get_is_active() const { }; String XRAnchor3D::get_configuration_warning() const { - if (!is_visible() || !is_inside_tree()) + if (!is_visible() || !is_inside_tree()) { return String(); + } // must be child node of XROrigin3D! XROrigin3D *origin = Object::cast_to<XROrigin3D>(get_parent()); @@ -532,11 +534,13 @@ XRAnchor3D::~XRAnchor3D(){ //////////////////////////////////////////////////////////////////////////////////////////////////// String XROrigin3D::get_configuration_warning() const { - if (!is_visible() || !is_inside_tree()) + if (!is_visible() || !is_inside_tree()) { return String(); + } - if (tracked_camera == nullptr) + if (tracked_camera == nullptr) { return TTR("XROrigin3D requires an XRCamera3D child node."); + } return String(); }; |