summaryrefslogtreecommitdiff
path: root/servers/physics_3d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-05-14 12:53:38 +0200
committerGitHub <noreply@github.com>2020-05-14 12:53:38 +0200
commit5f5f53e8eba5c9b708714de58d3cca6ceb010279 (patch)
tree8bebdce946466ce8e9476ccd46c9dba62c323938 /servers/physics_3d
parente7c9d818766a119089873e4941e4865fb36883ec (diff)
parent1f6f364a56319eabd02c050746fe7df3f55ffee3 (diff)
Merge pull request #38697 from akien-mga/member-init-c++11
Port member default initialization from constructor to declaration (C++11)
Diffstat (limited to 'servers/physics_3d')
-rw-r--r--servers/physics_3d/body_3d_sw.cpp2
-rw-r--r--servers/physics_3d/body_3d_sw.h2
-rw-r--r--servers/physics_3d/gjk_epa.cpp14
-rw-r--r--servers/physics_3d/joints/jacobian_entry_3d_sw.h2
4 files changed, 10 insertions, 10 deletions
diff --git a/servers/physics_3d/body_3d_sw.cpp b/servers/physics_3d/body_3d_sw.cpp
index fea5aed6ad..2f2525bb75 100644
--- a/servers/physics_3d/body_3d_sw.cpp
+++ b/servers/physics_3d/body_3d_sw.cpp
@@ -764,7 +764,7 @@ void Body3DSW::set_kinematic_margin(real_t p_margin) {
Body3DSW::Body3DSW() :
CollisionObject3DSW(TYPE_BODY),
- locked_axis(0),
+
active_list(this),
inertia_update_list(this),
direct_state_query_list(this) {
diff --git a/servers/physics_3d/body_3d_sw.h b/servers/physics_3d/body_3d_sw.h
index a67894b64b..0308d8689e 100644
--- a/servers/physics_3d/body_3d_sw.h
+++ b/servers/physics_3d/body_3d_sw.h
@@ -54,7 +54,7 @@ class Body3DSW : public CollisionObject3DSW {
real_t angular_damp;
real_t gravity_scale;
- uint16_t locked_axis;
+ uint16_t locked_axis = 0;
real_t kinematic_safe_margin;
real_t _inv_mass;
diff --git a/servers/physics_3d/gjk_epa.cpp b/servers/physics_3d/gjk_epa.cpp
index db37f261ce..aaa7de7531 100644
--- a/servers/physics_3d/gjk_epa.cpp
+++ b/servers/physics_3d/gjk_epa.cpp
@@ -513,16 +513,16 @@ struct GJK
};
struct sList
{
- sFace* root;
- U count;
- sList() : root(nullptr),count(0) {}
+ sFace* root = nullptr;
+ U count = 0;
+ sList() {}
};
struct sHorizon
{
- sFace* cf;
- sFace* ff;
- U nf;
- sHorizon() : cf(nullptr),ff(nullptr),nf(0) {}
+ sFace* cf = nullptr;
+ sFace* ff = nullptr;
+ U nf = 0;
+ sHorizon() {}
};
struct eStatus { enum _ {
Valid,
diff --git a/servers/physics_3d/joints/jacobian_entry_3d_sw.h b/servers/physics_3d/joints/jacobian_entry_3d_sw.h
index 7e605ab173..1737c21b3d 100644
--- a/servers/physics_3d/joints/jacobian_entry_3d_sw.h
+++ b/servers/physics_3d/joints/jacobian_entry_3d_sw.h
@@ -54,7 +54,7 @@ subject to the following restrictions:
class JacobianEntry3DSW {
public:
- JacobianEntry3DSW(){};
+ JacobianEntry3DSW() {}
//constraint between two different rigidbodies
JacobianEntry3DSW(
const Basis &world2A,