Browse Source

Sonar: Added '= default' where possible.

Jorrit Rouwe 4 years ago
parent
commit
405c4a2dac
48 changed files with 53 additions and 55 deletions
  1. 3 3
      Jolt/Core/JobSystem.h
  2. 1 1
      Jolt/Core/NonCopyable.h
  3. 1 1
      Jolt/Core/RTTI.h
  4. 1 1
      Jolt/Core/Reference.h
  5. 1 1
      Jolt/Core/StreamIn.h
  6. 1 1
      Jolt/Core/StreamOut.h
  7. 1 1
      Jolt/Core/TempAllocator.h
  8. 1 1
      Jolt/Geometry/IndexedTriangle.h
  9. 1 1
      Jolt/Geometry/OrientedBox.h
  10. 1 1
      Jolt/Geometry/Plane.h
  11. 1 1
      Jolt/Geometry/RayAABox.h
  12. 1 1
      Jolt/Geometry/Sphere.h
  13. 1 1
      Jolt/Geometry/Triangle.h
  14. 1 2
      Jolt/Math/Matrix.h
  15. 1 1
      Jolt/Math/Vector.h
  16. 1 1
      Jolt/ObjectStream/ObjectStream.h
  17. 0 1
      Jolt/ObjectStream/SerializableAttribute.h
  18. 1 1
      Jolt/ObjectStream/SerializableObject.h
  19. 1 1
      Jolt/Physics/Body/BodyActivationListener.h
  20. 1 1
      Jolt/Physics/Body/BodyCreationSettings.h
  21. 1 1
      Jolt/Physics/Body/BodyFilter.h
  22. 1 1
      Jolt/Physics/Body/BodyInterface.h
  23. 1 1
      Jolt/Physics/Body/BodyLockInterface.h
  24. 1 1
      Jolt/Physics/Body/BodyPair.h
  25. 1 1
      Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h
  26. 1 1
      Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h
  27. 3 3
      Jolt/Physics/Collision/BroadPhase/QuadTree.h
  28. 1 1
      Jolt/Physics/Collision/CollisionCollector.h
  29. 1 1
      Jolt/Physics/Collision/ContactListener.h
  30. 1 1
      Jolt/Physics/Collision/NarrowPhaseQuery.h
  31. 1 1
      Jolt/Physics/Collision/ObjectLayer.h
  32. 1 1
      Jolt/Physics/Collision/Shape/ConvexShape.h
  33. 1 1
      Jolt/Physics/Collision/Shape/Shape.h
  34. 1 1
      Jolt/Physics/Collision/ShapeFilter.h
  35. 1 1
      Jolt/Physics/Constraints/Constraint.h
  36. 1 1
      Jolt/Physics/Constraints/MotorSettings.h
  37. 1 1
      Jolt/Physics/PhysicsStepListener.h
  38. 1 1
      Jolt/Physics/Vehicle/VehicleCollisionTester.h
  39. 1 1
      Jolt/Physics/Vehicle/VehicleController.h
  40. 2 2
      Jolt/Physics/Vehicle/Wheel.h
  41. 1 1
      Jolt/TriangleGrouper/TriangleGrouper.h
  42. 2 2
      Jolt/TriangleSplitter/TriangleSplitter.h
  43. 1 1
      Samples/Tests/Test.h
  44. 1 1
      TestFramework/Image/ZoomImage.cpp
  45. 1 1
      TestFramework/UI/UIAnimation.h
  46. 1 1
      TestFramework/UI/UIEventListener.h
  47. 1 1
      TestFramework/UI/UITexturedQuad.h
  48. 1 1
      UnitTests/ObjectStream/ObjectStreamTest.cpp

+ 3 - 3
Jolt/Core/JobSystem.h

@@ -50,7 +50,7 @@ public:
 	{
 	{
 	public:
 	public:
 		/// Constructor 
 		/// Constructor 
-		inline				JobHandle()									{ }
+		inline				JobHandle() = default;
 		inline				JobHandle(const JobHandle &inHandle)		: Ref<Job>(inHandle) { }
 		inline				JobHandle(const JobHandle &inHandle)		: Ref<Job>(inHandle) { }
 		inline				JobHandle(JobHandle &&inHandle) noexcept	: Ref<Job>(move(inHandle)) { }
 		inline				JobHandle(JobHandle &&inHandle) noexcept	: Ref<Job>(move(inHandle)) { }
 
 
@@ -105,7 +105,7 @@ public:
 		friend class Job;
 		friend class Job;
 
 
 		/// Destructor, you should call JobSystem::DestroyBarrier instead of destructing this object directly
 		/// Destructor, you should call JobSystem::DestroyBarrier instead of destructing this object directly
-		virtual				~Barrier()									{ }
+		virtual				~Barrier() = default;
 
 
 		/// Called by a Job to mark that it is finished
 		/// Called by a Job to mark that it is finished
 		virtual void		OnJobFinished(Job *inJob) = 0;
 		virtual void		OnJobFinished(Job *inJob) = 0;
@@ -115,7 +115,7 @@ public:
 	using JobFunction = function<void()>;
 	using JobFunction = function<void()>;
 
 
 	/// Destructor
 	/// Destructor
-	virtual					~JobSystem()								{ }
+	virtual					~JobSystem() = default;
 
 
 	/// Get maximum number of concurrently executing jobs
 	/// Get maximum number of concurrently executing jobs
 	virtual int				GetMaxConcurrency() const = 0;
 	virtual int				GetMaxConcurrency() const = 0;

+ 1 - 1
Jolt/Core/NonCopyable.h

@@ -9,7 +9,7 @@ namespace JPH {
 class NonCopyable
 class NonCopyable
 {
 {
 public:
 public:
-	inline	NonCopyable() { }
+	inline	NonCopyable() = default;
 			NonCopyable(const NonCopyable &) = delete;
 			NonCopyable(const NonCopyable &) = delete;
 	void	operator = (const NonCopyable &) = delete;
 	void	operator = (const NonCopyable &) = delete;
 };
 };

+ 1 - 1
Jolt/Core/RTTI.h

@@ -448,7 +448,7 @@ public:
 	/// Constructor
 	/// Constructor
 								RTTIAttribute()												: mName("") { }
 								RTTIAttribute()												: mName("") { }
 								RTTIAttribute(const char *inName)							: mName(inName) { }
 								RTTIAttribute(const char *inName)							: mName(inName) { }
-	virtual						~RTTIAttribute()											{ }
+	virtual						~RTTIAttribute() = default;
 
 
 	/// Name of the attribute
 	/// Name of the attribute
 	void						SetName(const char *inName)									{ mName = inName; }
 	void						SetName(const char *inName)									{ mName = inName; }

+ 1 - 1
Jolt/Core/Reference.h

@@ -70,7 +70,7 @@ class RefTargetVirtual
 {
 {
 public:
 public:
 	/// Virtual destructor
 	/// Virtual destructor
-	virtual					~RefTargetVirtual()								{ }
+	virtual					~RefTargetVirtual() = default;
 
 
 	/// Virtual add reference
 	/// Virtual add reference
 	virtual void			AddRef() = 0;
 	virtual void			AddRef() = 0;

+ 1 - 1
Jolt/Core/StreamIn.h

@@ -10,7 +10,7 @@ class StreamIn
 {
 {
 public:
 public:
 	/// Virtual destructor
 	/// Virtual destructor
-	virtual				~StreamIn() { }
+	virtual				~StreamIn() = default;
 
 
 	/// Read a string of bytes from the binary stream
 	/// Read a string of bytes from the binary stream
 	virtual void		ReadBytes(void *outData, size_t inNumBytes) = 0;
 	virtual void		ReadBytes(void *outData, size_t inNumBytes) = 0;

+ 1 - 1
Jolt/Core/StreamOut.h

@@ -10,7 +10,7 @@ class StreamOut
 {
 {
 public:
 public:
 	/// Virtual destructor
 	/// Virtual destructor
-	virtual				~StreamOut() { }
+	virtual				~StreamOut() = default;
 
 
 	/// Write a string of bytes to the binary stream
 	/// Write a string of bytes to the binary stream
 	virtual void		WriteBytes(const void *inData, size_t inNumBytes) = 0;
 	virtual void		WriteBytes(const void *inData, size_t inNumBytes) = 0;

+ 1 - 1
Jolt/Core/TempAllocator.h

@@ -13,7 +13,7 @@ class TempAllocator
 {
 {
 public:
 public:
 	/// Destructor
 	/// Destructor
-	virtual							~TempAllocator() { }
+	virtual							~TempAllocator() = default;
 
 
 	/// Allocates inSize bytes of memory, returned memory address must be 16 byte aligned
 	/// Allocates inSize bytes of memory, returned memory address must be 16 byte aligned
 	virtual void *					Allocate(uint inSize) = 0;
 	virtual void *					Allocate(uint inSize) = 0;

+ 1 - 1
Jolt/Geometry/IndexedTriangle.h

@@ -12,7 +12,7 @@ class IndexedTriangleNoMaterial
 {
 {
 public:
 public:
 	/// Constructor
 	/// Constructor
-					IndexedTriangleNoMaterial()											{ }
+					IndexedTriangleNoMaterial() = default;
 					IndexedTriangleNoMaterial(uint32 inI1, uint32 inI2, uint32 inI3)	{ mIdx[0] = inI1; mIdx[1] = inI2; mIdx[2] = inI3; }
 					IndexedTriangleNoMaterial(uint32 inI1, uint32 inI2, uint32 inI3)	{ mIdx[0] = inI1; mIdx[1] = inI2; mIdx[2] = inI3; }
 
 
 	/// Check if two triangles are identical
 	/// Check if two triangles are identical

+ 1 - 1
Jolt/Geometry/OrientedBox.h

@@ -17,7 +17,7 @@ class [[nodiscard]] OrientedBox
 {
 {
 public:
 public:
 	/// Constructor
 	/// Constructor
-					OrientedBox()														{ }
+					OrientedBox() = default;
 					OrientedBox(Mat44Arg inOrientation, Vec3Arg inHalfExtents)			: mOrientation(inOrientation), mHalfExtents(inHalfExtents) { }
 					OrientedBox(Mat44Arg inOrientation, Vec3Arg inHalfExtents)			: mOrientation(inOrientation), mHalfExtents(inHalfExtents) { }
 
 
 	/// Construct from axis aligned box and transform. Only works for rotation/translation matrix (no scaling / shearing).
 	/// Construct from axis aligned box and transform. Only works for rotation/translation matrix (no scaling / shearing).

+ 1 - 1
Jolt/Geometry/Plane.h

@@ -10,7 +10,7 @@ class [[nodiscard]] Plane
 {
 {
 public:
 public:
 	/// Constructor
 	/// Constructor
-					Plane()																	{ }
+					Plane() = default;
 					Plane(Vec4Arg inNormalAndConstant)										: mNormalAndConstant(inNormalAndConstant) { }
 					Plane(Vec4Arg inNormalAndConstant)										: mNormalAndConstant(inNormalAndConstant) { }
 					Plane(Vec3Arg inNormal, float inConstant)								: mNormalAndConstant(inNormal, inConstant) { }
 					Plane(Vec3Arg inNormal, float inConstant)								: mNormalAndConstant(inNormal, inConstant) { }
 
 

+ 1 - 1
Jolt/Geometry/RayAABox.h

@@ -10,7 +10,7 @@ class RayInvDirection
 {
 {
 public:
 public:
 	/// Constructors
 	/// Constructors
-	inline			RayInvDirection() { }
+	inline			RayInvDirection() = default;
 	inline			RayInvDirection(Vec3Arg inDirection) { Set(inDirection); }
 	inline			RayInvDirection(Vec3Arg inDirection) { Set(inDirection); }
 
 
 	/// Set reciprocal from ray direction
 	/// Set reciprocal from ray direction

+ 1 - 1
Jolt/Geometry/Sphere.h

@@ -11,7 +11,7 @@ class [[nodiscard]] Sphere
 {
 {
 public:
 public:
 	/// Constructor
 	/// Constructor
-	inline				Sphere()												{ }
+	inline				Sphere() = default;
 	inline				Sphere(const Float3 &inCenter, float inRadius)			: mCenter(inCenter), mRadius(inRadius) { }
 	inline				Sphere(const Float3 &inCenter, float inRadius)			: mCenter(inCenter), mRadius(inRadius) { }
 	inline				Sphere(Vec3Arg inCenter, float inRadius)				: mRadius(inRadius) { inCenter.StoreFloat3(&mCenter); }
 	inline				Sphere(Vec3Arg inCenter, float inRadius)				: mRadius(inRadius) { inCenter.StoreFloat3(&mCenter); }
 
 

+ 1 - 1
Jolt/Geometry/Triangle.h

@@ -10,7 +10,7 @@ class Triangle
 {
 {
 public:
 public:
 	/// Constructor
 	/// Constructor
-					Triangle() { }
+					Triangle() = default;
 					Triangle(const Float3 &inV1, const Float3 &inV2, const Float3 &inV3) : mV { inV1, inV2, inV3 } { }
 					Triangle(const Float3 &inV1, const Float3 &inV2, const Float3 &inV3) : mV { inV1, inV2, inV3 } { }
 					Triangle(const Float3 &inV1, const Float3 &inV2, const Float3 &inV3, uint32 inMaterialIndex) : Triangle(inV1, inV2, inV3) { mMaterialIndex = inMaterialIndex; }
 					Triangle(const Float3 &inV1, const Float3 &inV2, const Float3 &inV3, uint32 inMaterialIndex) : Triangle(inV1, inV2, inV3) { mMaterialIndex = inMaterialIndex; }
 					Triangle(Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3) { inV1.StoreFloat3(&mV[0]); inV2.StoreFloat3(&mV[1]); inV3.StoreFloat3(&mV[2]); }
 					Triangle(Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3) { inV1.StoreFloat3(&mV[0]); inV2.StoreFloat3(&mV[1]); inV3.StoreFloat3(&mV[2]); }

+ 1 - 2
Jolt/Math/Matrix.h

@@ -14,7 +14,7 @@ class [[nodiscard]] Matrix
 {
 {
 public:
 public:
 	/// Constructor
 	/// Constructor
-	inline									Matrix()												{ }
+	inline									Matrix() = default;
 	inline									Matrix(const Matrix &inM2)								{ *this = inM2; }
 	inline									Matrix(const Matrix &inM2)								{ *this = inM2; }
 
 
 	/// Dimensions
 	/// Dimensions
@@ -243,7 +243,6 @@ inline bool Matrix<2, 2>::SetInversed(const Matrix<2, 2> &inM)
 		return false;
 		return false;
 
 
 	// Construct inverse
 	// Construct inverse
-	Matrix<2, 2> out;
 	mCol[0].mF32[0] = d / det;
 	mCol[0].mF32[0] = d / det;
 	mCol[1].mF32[0] = -b / det;
 	mCol[1].mF32[0] = -b / det;
 	mCol[0].mF32[1] = -c / det;
 	mCol[0].mF32[1] = -c / det;

+ 1 - 1
Jolt/Math/Vector.h

@@ -11,7 +11,7 @@ class [[nodiscard]] Vector
 {
 {
 public:
 public:
 	/// Constructor
 	/// Constructor
-	inline						Vector()												{ }
+	inline						Vector() = default;
 	inline						Vector(const Vector &inRHS)								{ *this = inRHS; }
 	inline						Vector(const Vector &inRHS)								{ *this = inRHS; }
 
 
 	/// Dimensions
 	/// Dimensions

+ 1 - 1
Jolt/ObjectStream/ObjectStream.h

@@ -41,7 +41,7 @@ public:
 
 
 protected:
 protected:
 	/// Constructor
 	/// Constructor
-	virtual							~ObjectStream()										{ }
+	virtual							~ObjectStream() = default;
 
 
 	/// Identifier for objects
 	/// Identifier for objects
 	using Identifier = uint32;
 	using Identifier = uint32;

+ 0 - 1
Jolt/ObjectStream/SerializableAttribute.h

@@ -17,7 +17,6 @@ class SerializableAttribute : public RTTIAttribute
 public:
 public:
 	/// Constructor
 	/// Constructor
 								SerializableAttribute(const char *inName)							: RTTIAttribute(inName) { }
 								SerializableAttribute(const char *inName)							: RTTIAttribute(inName) { }
-	virtual						~SerializableAttribute() override									{ }
 
 
 	///@name Serialization operations
 	///@name Serialization operations
 	virtual bool				IsType(int inArrayDepth, ObjectStream::EDataType inDataType, const char *inClassName) const = 0;
 	virtual bool				IsType(int inArrayDepth, ObjectStream::EDataType inDataType, const char *inClassName) const = 0;

+ 1 - 1
Jolt/ObjectStream/SerializableObject.h

@@ -211,7 +211,7 @@ class SerializableObject
 
 
 public:
 public:
 	/// Constructor
 	/// Constructor
-	virtual						~SerializableObject()																{ }
+	virtual						~SerializableObject() = default;
 
 
 	/// Callback given when object has been loaded from an object stream
 	/// Callback given when object has been loaded from an object stream
 	/// This is called when all links have been resolved. Objects that this object point to have already received their OnLoaded callback.
 	/// This is called when all links have been resolved. Objects that this object point to have already received their OnLoaded callback.

+ 1 - 1
Jolt/Physics/Body/BodyActivationListener.h

@@ -13,7 +13,7 @@ class BodyActivationListener
 {
 {
 public:
 public:
 	/// Ensure virtual destructor
 	/// Ensure virtual destructor
-	virtual					~BodyActivationListener()										{ }
+	virtual					~BodyActivationListener() = default;
 
 
 	/// Called whenever a body activates, note this can be called from any thread so make sure your code is thread safe.
 	/// Called whenever a body activates, note this can be called from any thread so make sure your code is thread safe.
 	/// At the time of the callback the body inBodyID will be locked and no bodies can be activated/deactivated from the callback.
 	/// At the time of the callback the body inBodyID will be locked and no bodies can be activated/deactivated from the callback.

+ 1 - 1
Jolt/Physics/Body/BodyCreationSettings.h

@@ -30,7 +30,7 @@ public:
 	JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(BodyCreationSettings)
 	JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(BodyCreationSettings)
 
 
 	/// Constructor
 	/// Constructor
-							BodyCreationSettings()											{ }
+							BodyCreationSettings() = default;
 							BodyCreationSettings(const ShapeSettings *inShape, Vec3Arg inPosition, QuatArg inRotation, EMotionType inMotionType, ObjectLayer inObjectLayer) : mPosition(inPosition), mRotation(inRotation), mObjectLayer(inObjectLayer), mMotionType(inMotionType), mShape(inShape) { }
 							BodyCreationSettings(const ShapeSettings *inShape, Vec3Arg inPosition, QuatArg inRotation, EMotionType inMotionType, ObjectLayer inObjectLayer) : mPosition(inPosition), mRotation(inRotation), mObjectLayer(inObjectLayer), mMotionType(inMotionType), mShape(inShape) { }
 							BodyCreationSettings(const Shape *inShape, Vec3Arg inPosition, QuatArg inRotation, EMotionType inMotionType, ObjectLayer inObjectLayer) : mPosition(inPosition), mRotation(inRotation), mObjectLayer(inObjectLayer), mMotionType(inMotionType), mShapePtr(inShape) { }
 							BodyCreationSettings(const Shape *inShape, Vec3Arg inPosition, QuatArg inRotation, EMotionType inMotionType, ObjectLayer inObjectLayer) : mPosition(inPosition), mRotation(inRotation), mObjectLayer(inObjectLayer), mMotionType(inMotionType), mShapePtr(inShape) { }
 
 

+ 1 - 1
Jolt/Physics/Body/BodyFilter.h

@@ -13,7 +13,7 @@ class BodyFilter : public NonCopyable
 {
 {
 public:
 public:
 	/// Destructor
 	/// Destructor
-	virtual					~BodyFilter() { }
+	virtual					~BodyFilter() = default;
 
 
 	/// Filter function. Returns true if we should collide with inBodyID
 	/// Filter function. Returns true if we should collide with inBodyID
 	virtual bool			ShouldCollide(const BodyID &inBodyID) const
 	virtual bool			ShouldCollide(const BodyID &inBodyID) const

+ 1 - 1
Jolt/Physics/Body/BodyInterface.h

@@ -27,7 +27,7 @@ class BodyInterface : public NonCopyable
 {
 {
 public:
 public:
 	/// Constructor
 	/// Constructor
-								BodyInterface() { }
+								BodyInterface() = default;
 								BodyInterface(BodyLockInterface &inBodyLockInterface, BodyManager &inBodyManager, BroadPhase &inBroadPhase) : mBodyLockInterface(&inBodyLockInterface), mBodyManager(&inBodyManager), mBroadPhase(&inBroadPhase) { }
 								BodyInterface(BodyLockInterface &inBodyLockInterface, BodyManager &inBodyManager, BroadPhase &inBroadPhase) : mBodyLockInterface(&inBodyLockInterface), mBodyManager(&inBodyManager), mBroadPhase(&inBroadPhase) { }
 	
 	
 	/// Create a body
 	/// Create a body

+ 1 - 1
Jolt/Physics/Body/BodyLockInterface.h

@@ -20,7 +20,7 @@ public:
 
 
 	/// Constructor
 	/// Constructor
 								BodyLockInterface(BodyManager &inBodyManager)		: mBodyManager(inBodyManager) { }
 								BodyLockInterface(BodyManager &inBodyManager)		: mBodyManager(inBodyManager) { }
-	virtual						~BodyLockInterface()								{ }
+	virtual						~BodyLockInterface() = default;
 
 
 	///@name Locking functions
 	///@name Locking functions
 	///@{
 	///@{

+ 1 - 1
Jolt/Physics/Body/BodyPair.h

@@ -12,7 +12,7 @@ namespace JPH {
 struct BodyPair
 struct BodyPair
 {
 {
 	/// Constructor
 	/// Constructor
-							BodyPair()													{ }
+							BodyPair() = default;
 							BodyPair(BodyID inA, BodyID inB)							: mBodyA(inA), mBodyB(inB) { }
 							BodyPair(BodyID inA, BodyID inB)							: mBodyA(inA), mBodyB(inB) { }
 
 
 	/// Equals operator
 	/// Equals operator

+ 1 - 1
Jolt/Physics/Collision/BroadPhase/BroadPhaseLayer.h

@@ -67,7 +67,7 @@ class BroadPhaseLayerFilter : public NonCopyable
 {
 {
 public:
 public:
 	/// Destructor
 	/// Destructor
-	virtual							~BroadPhaseLayerFilter() { }
+	virtual							~BroadPhaseLayerFilter() = default;
 
 
 	/// Function to filter out broadphase layers when doing collision query test (return true to allow testing against objects with this layer)
 	/// Function to filter out broadphase layers when doing collision query test (return true to allow testing against objects with this layer)
 	virtual bool					ShouldCollide(BroadPhaseLayer inLayer) const
 	virtual bool					ShouldCollide(BroadPhaseLayer inLayer) const

+ 1 - 1
Jolt/Physics/Collision/BroadPhase/BroadPhaseQuery.h

@@ -27,7 +27,7 @@ class BroadPhaseQuery : public NonCopyable
 {
 {
 public:
 public:
 	/// Virtual destructor
 	/// Virtual destructor
-	virtual				~BroadPhaseQuery() { }
+	virtual				~BroadPhaseQuery() = default;
 
 
 	/// Cast a ray and add any hits to ioCollector
 	/// Cast a ray and add any hits to ioCollector
 	virtual void		CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0;
 	virtual void		CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0;

+ 3 - 3
Jolt/Physics/Collision/BroadPhase/QuadTree.h

@@ -26,7 +26,7 @@ private:
 	{
 	{
 	public:
 	public:
 		/// Default constructor does not initialize
 		/// Default constructor does not initialize
-		inline 					NodeID()							{ }
+		inline 					NodeID() = default;
 
 
 		/// Construct a node ID
 		/// Construct a node ID
 		static inline NodeID	sInvalid()							{ return NodeID(cInvalidNodeIndex); }
 		static inline NodeID	sInvalid()							{ return NodeID(cInvalidNodeIndex); }
@@ -63,7 +63,7 @@ private:
 	{
 	{
 	public:
 	public:
 		/// Constructor
 		/// Constructor
-								AtomicNodeID() { }
+								AtomicNodeID() = default;
 								AtomicNodeID(const NodeID &inRHS)			: mID(inRHS.mID) { }
 								AtomicNodeID(const NodeID &inRHS)			: mID(inRHS.mID) { }
 
 
 		/// Assignment
 		/// Assignment
@@ -148,7 +148,7 @@ public:
 	struct Tracking
 	struct Tracking
 	{
 	{
 		/// Constructor to satisfy the vector class
 		/// Constructor to satisfy the vector class
-								Tracking() { }
+								Tracking() = default;
 								Tracking(const Tracking &inRHS) : mBroadPhaseLayer(inRHS.mBroadPhaseLayer.load()), mObjectLayer(inRHS.mObjectLayer.load()), mBodyLocation(inRHS.mBodyLocation.load()) { }
 								Tracking(const Tracking &inRHS) : mBroadPhaseLayer(inRHS.mBroadPhaseLayer.load()), mObjectLayer(inRHS.mObjectLayer.load()), mBodyLocation(inRHS.mBodyLocation.load()) { }
 
 
 		/// Invalid body location identifier
 		/// Invalid body location identifier

+ 1 - 1
Jolt/Physics/Collision/CollisionCollector.h

@@ -46,7 +46,7 @@ public:
 	using ResultType = ResultTypeArg;
 	using ResultType = ResultTypeArg;
 
 
 	/// Destructor
 	/// Destructor
-	virtual					~CollisionCollector()							{ }
+	virtual					~CollisionCollector() = default;
 
 
 	/// If you want to reuse this collector, call Reset()
 	/// If you want to reuse this collector, call Reset()
 	virtual void			Reset()											{ mEarlyOutFraction = TraitsType::InitialEarlyOutFraction; } 
 	virtual void			Reset()											{ mEarlyOutFraction = TraitsType::InitialEarlyOutFraction; } 

+ 1 - 1
Jolt/Physics/Collision/ContactListener.h

@@ -54,7 +54,7 @@ class ContactListener
 {
 {
 public:
 public:
 	/// Ensure virtual destructor
 	/// Ensure virtual destructor
-	virtual					~ContactListener()												{ }
+	virtual					~ContactListener() = default;
 
 
 	/// Called after detecting a collision between a body pair, but before calling OnContactAdded and before adding the contact constraint.
 	/// Called after detecting a collision between a body pair, but before calling OnContactAdded and before adding the contact constraint.
 	/// If the function returns false, the contact will not be added and any other contacts between this body pair will not be processed.
 	/// If the function returns false, the contact will not be added and any other contacts between this body pair will not be processed.

+ 1 - 1
Jolt/Physics/Collision/NarrowPhaseQuery.h

@@ -21,7 +21,7 @@ class NarrowPhaseQuery : public NonCopyable
 {
 {
 public:
 public:
 	/// Constructor
 	/// Constructor
-								NarrowPhaseQuery() { }
+								NarrowPhaseQuery() = default;
 								NarrowPhaseQuery(BodyInterface &inBodyInterface, BroadPhase &inBroadPhase) : mBodyInterface(&inBodyInterface), mBroadPhase(&inBroadPhase) { }
 								NarrowPhaseQuery(BodyInterface &inBodyInterface, BroadPhase &inBroadPhase) : mBodyInterface(&inBodyInterface), mBroadPhase(&inBroadPhase) { }
 
 
 	/// Cast a ray, returns true if it finds a hit closer than ioHit.mFraction and updates ioHit in that case.
 	/// Cast a ray, returns true if it finds a hit closer than ioHit.mFraction and updates ioHit in that case.

+ 1 - 1
Jolt/Physics/Collision/ObjectLayer.h

@@ -18,7 +18,7 @@ class ObjectLayerFilter : public NonCopyable
 {
 {
 public:
 public:
 	/// Destructor
 	/// Destructor
-	virtual					~ObjectLayerFilter() { }
+	virtual					~ObjectLayerFilter() = default;
 
 
 	/// Function to filter out object layers when doing collision query test (return true to allow testing against objects with this layer)
 	/// Function to filter out object layers when doing collision query test (return true to allow testing against objects with this layer)
 	virtual bool			ShouldCollide(ObjectLayer inLayer) const
 	virtual bool			ShouldCollide(ObjectLayer inLayer) const

+ 1 - 1
Jolt/Physics/Collision/Shape/ConvexShape.h

@@ -78,7 +78,7 @@ public:
 	{
 	{
 	public:
 	public:
 		/// Warning: Virtual destructor will not be called on this object!
 		/// Warning: Virtual destructor will not be called on this object!
-		virtual						~Support() { }
+		virtual						~Support() = default;
 
 
 		/// Calculate the support vector for this convex shape (includes / excludes the convex radius depending on how this was obtained). 
 		/// Calculate the support vector for this convex shape (includes / excludes the convex radius depending on how this was obtained). 
 		/// Support vector is relative to the center of mass of the shape.
 		/// Support vector is relative to the center of mass of the shape.

+ 1 - 1
Jolt/Physics/Collision/Shape/Shape.h

@@ -93,7 +93,7 @@ public:
 									Shape(const ShapeSettings &inSettings, ShapeResult &outResult)		: mUserData(inSettings.mUserData) { }
 									Shape(const ShapeSettings &inSettings, ShapeResult &outResult)		: mUserData(inSettings.mUserData) { }
 
 
 	/// Destructor
 	/// Destructor
-	virtual							~Shape()															{ }
+	virtual							~Shape() = default;
 
 
 	/// Get type
 	/// Get type
 	virtual EShapeType				GetType() const = 0;
 	virtual EShapeType				GetType() const = 0;

+ 1 - 1
Jolt/Physics/Collision/ShapeFilter.h

@@ -15,7 +15,7 @@ class ShapeFilter : public NonCopyable
 {
 {
 public:
 public:
 	/// Destructor
 	/// Destructor
-	virtual					~ShapeFilter()									{ }
+	virtual					~ShapeFilter() = default;
 
 
 	/// Filter function to determine if two shapes should collide. Returns true if the filter passes.
 	/// Filter function to determine if two shapes should collide. Returns true if the filter passes.
 	virtual bool			ShouldCollide(const SubShapeID &inSubShapeID1, const SubShapeID &inSubShapeID2) const
 	virtual bool			ShouldCollide(const SubShapeID &inSubShapeID1, const SubShapeID &inSubShapeID2) const

+ 1 - 1
Jolt/Physics/Constraints/Constraint.h

@@ -74,7 +74,7 @@ public:
 	}
 	}
 
 
 	/// Virtual destructor
 	/// Virtual destructor
-	virtual						~Constraint()								{ }
+	virtual						~Constraint() = default;
 
 
 	/// Get the type of a constraint
 	/// Get the type of a constraint
 	virtual EConstraintType		GetType() const = 0;
 	virtual EConstraintType		GetType() const = 0;

+ 1 - 1
Jolt/Physics/Constraints/MotorSettings.h

@@ -25,7 +25,7 @@ public:
 	JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(MotorSettings)
 	JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(MotorSettings)
 
 
 	/// Constructor
 	/// Constructor
-							MotorSettings() { }
+							MotorSettings() = default;
 							MotorSettings(const MotorSettings &inRHS) = default;
 							MotorSettings(const MotorSettings &inRHS) = default;
 							MotorSettings(float inFrequency, float inDamping) : mFrequency(inFrequency), mDamping(inDamping) { JPH_ASSERT(IsValid()); }
 							MotorSettings(float inFrequency, float inDamping) : mFrequency(inFrequency), mDamping(inDamping) { JPH_ASSERT(IsValid()); }
 							MotorSettings(float inFrequency, float inDamping, float inForceLimit, float inTorqueLimit) : mFrequency(inFrequency), mDamping(inDamping), mMinForceLimit(-inForceLimit), mMaxForceLimit(inForceLimit), mMinTorqueLimit(-inTorqueLimit), mMaxTorqueLimit(inTorqueLimit) { JPH_ASSERT(IsValid()); }
 							MotorSettings(float inFrequency, float inDamping, float inForceLimit, float inTorqueLimit) : mFrequency(inFrequency), mDamping(inDamping), mMinForceLimit(-inForceLimit), mMaxForceLimit(inForceLimit), mMinTorqueLimit(-inTorqueLimit), mMaxTorqueLimit(inTorqueLimit) { JPH_ASSERT(IsValid()); }

+ 1 - 1
Jolt/Physics/PhysicsStepListener.h

@@ -12,7 +12,7 @@ class PhysicsStepListener
 {
 {
 public:
 public:
 	/// Ensure virtual destructor
 	/// Ensure virtual destructor
-	virtual					~PhysicsStepListener()												{ }
+	virtual					~PhysicsStepListener() = default;
 
 
 	/// Called before every simulation step (received inCollisionSteps times for every PhysicsSystem::Update(...) call)
 	/// Called before every simulation step (received inCollisionSteps times for every PhysicsSystem::Update(...) call)
 	/// This is called while all bodies and constraints are locked for modifications. Multiple listeners can be executed in parallel and it is the responsibility of the listener
 	/// This is called while all bodies and constraints are locked for modifications. Multiple listeners can be executed in parallel and it is the responsibility of the listener

+ 1 - 1
Jolt/Physics/Vehicle/VehicleCollisionTester.h

@@ -14,7 +14,7 @@ class VehicleCollisionTester : public RefTarget<VehicleCollisionTester>
 {
 {
 public:
 public:
 	/// Virtual destructor
 	/// Virtual destructor
-	virtual						~VehicleCollisionTester()						{ }
+	virtual						~VehicleCollisionTester() = default;
 
 
 	/// Do a collision test with the world
 	/// Do a collision test with the world
 	/// @param inPhysicsSystem The physics system that should be tested against
 	/// @param inPhysicsSystem The physics system that should be tested against

+ 1 - 1
Jolt/Physics/Vehicle/VehicleController.h

@@ -34,7 +34,7 @@ class VehicleController : public RefTarget<VehicleController>
 public:
 public:
 	/// Constructor / destructor
 	/// Constructor / destructor
 								VehicleController(VehicleConstraint &inConstraint) : mConstraint(inConstraint) { }
 								VehicleController(VehicleConstraint &inConstraint) : mConstraint(inConstraint) { }
-	virtual						~VehicleController() { }
+	virtual						~VehicleController() = default;
 
 
 protected:
 protected:
 	// The functions below are only for the VehicleConstraint
 	// The functions below are only for the VehicleConstraint

+ 2 - 2
Jolt/Physics/Vehicle/Wheel.h

@@ -41,8 +41,8 @@ class Wheel
 {
 {
 public:
 public:
 	/// Constructor / destructor
 	/// Constructor / destructor
-							Wheel(const WheelSettings &inSettings);
-	virtual					~Wheel()									{ }
+	explicit				Wheel(const WheelSettings &inSettings);
+	virtual					~Wheel() = default;
 
 
 	/// Get settings for the wheel
 	/// Get settings for the wheel
 	const WheelSettings *	GetSettings() const							{ return mSettings; }
 	const WheelSettings *	GetSettings() const							{ return mSettings; }

+ 1 - 1
Jolt/TriangleGrouper/TriangleGrouper.h

@@ -12,7 +12,7 @@ class TriangleGrouper
 {
 {
 public:
 public:
 	/// Virtual destructor
 	/// Virtual destructor
-	virtual					~TriangleGrouper() { }
+	virtual					~TriangleGrouper() = default;
 
 
 	/// Group a batch of indexed triangles
 	/// Group a batch of indexed triangles
 	/// @param inVertices The list of vertices
 	/// @param inVertices The list of vertices

+ 2 - 2
Jolt/TriangleSplitter/TriangleSplitter.h

@@ -15,7 +15,7 @@ public:
 								TriangleSplitter(const VertexList &inVertices, const IndexedTriangleList &inTriangles);
 								TriangleSplitter(const VertexList &inVertices, const IndexedTriangleList &inTriangles);
 
 
 	/// Virtual destructor
 	/// Virtual destructor
-	virtual						~TriangleSplitter() { }
+	virtual						~TriangleSplitter() = default;
 
 
 	struct Stats
 	struct Stats
 	{
 	{
@@ -30,7 +30,7 @@ public:
 	struct Range
 	struct Range
 	{
 	{
 		/// Constructor
 		/// Constructor
-								Range() { }
+								Range() = default;
 								Range(uint inBegin, uint inEnd) : mBegin(inBegin), mEnd(inEnd) { }
 								Range(uint inBegin, uint inEnd) : mBegin(inBegin), mEnd(inEnd) { }
 
 
 		/// Get number of triangles in range
 		/// Get number of triangles in range

+ 1 - 1
Samples/Tests/Test.h

@@ -24,7 +24,7 @@ public:
 	JPH_DECLARE_RTTI_VIRTUAL_BASE(Test)
 	JPH_DECLARE_RTTI_VIRTUAL_BASE(Test)
 
 
 	// Destructor
 	// Destructor
-	virtual			~Test()														{ }
+	virtual			~Test() = default;
 
 
 	// Set the physics system
 	// Set the physics system
 	virtual void	SetPhysicsSystem(PhysicsSystem *inPhysicsSystem)			{ mPhysicsSystem = inPhysicsSystem; mBodyInterface = &inPhysicsSystem->GetBodyInterface(); }
 	virtual void	SetPhysicsSystem(PhysicsSystem *inPhysicsSystem)			{ mPhysicsSystem = inPhysicsSystem; mBodyInterface = &inPhysicsSystem->GetBodyInterface(); }

+ 1 - 1
TestFramework/Image/ZoomImage.cpp

@@ -21,7 +21,7 @@ class ImageFilter
 {
 {
 public:
 public:
 	// Destructor
 	// Destructor
-	virtual			~ImageFilter() { }
+	virtual			~ImageFilter() = default;
 
 
 	// Get support of this filter (+/- the range the filter function is not zero)
 	// Get support of this filter (+/- the range the filter function is not zero)
 	virtual float	GetSupport() const = 0;						
 	virtual float	GetSupport() const = 0;						

+ 1 - 1
TestFramework/UI/UIAnimation.h

@@ -14,7 +14,7 @@ public:
 	JPH_DECLARE_RTTI_VIRTUAL_BASE(UIAnimation)
 	JPH_DECLARE_RTTI_VIRTUAL_BASE(UIAnimation)
 
 
 	/// Destructor
 	/// Destructor
-	virtual			~UIAnimation()										{ }
+	virtual			~UIAnimation() = default;
 
 
 	///@name Interface
 	///@name Interface
 	virtual void	Init(UIElement *inElement)							{ }
 	virtual void	Init(UIElement *inElement)							{ }

+ 1 - 1
TestFramework/UI/UIEventListener.h

@@ -16,7 +16,7 @@ class UIEventListener
 {
 {
 public:
 public:
 	/// Destructor
 	/// Destructor
-	virtual				~UIEventListener() { }
+	virtual				~UIEventListener() = default;
 
 
 	/// Handle an UI event, function should return true if event was handled
 	/// Handle an UI event, function should return true if event was handled
 	virtual bool		HandleUIEvent(EUIEvent inEvent, UIElement *inSender) = 0;
 	virtual bool		HandleUIEvent(EUIEvent inEvent, UIElement *inSender) = 0;

+ 1 - 1
TestFramework/UI/UITexturedQuad.h

@@ -10,7 +10,7 @@ class UITexturedQuad
 {
 {
 public:
 public:
 	/// Constructor
 	/// Constructor
-							UITexturedQuad()				{ }
+							UITexturedQuad() = default;
 							UITexturedQuad(const Texture *inTexture) : mTexture(inTexture), mWidth(inTexture->GetWidth()), mHeight(inTexture->GetHeight()) { }
 							UITexturedQuad(const Texture *inTexture) : mTexture(inTexture), mWidth(inTexture->GetWidth()), mHeight(inTexture->GetHeight()) { }
 							UITexturedQuad(const Texture *inTexture, int inX, int inY, int inWidth, int inHeight) : mTexture(inTexture), mX(inX), mY(inY), mWidth(inWidth), mHeight(inHeight) { }
 							UITexturedQuad(const Texture *inTexture, int inX, int inY, int inWidth, int inHeight) : mTexture(inTexture), mX(inX), mY(inY), mWidth(inWidth), mHeight(inHeight) { }
 							UITexturedQuad(const Texture *inTexture, int inX, int inY, int inWidth, int inHeight, int inInnerX, int inInnerY, int inInnerWidth, int inInnerHeight) : mTexture(inTexture), mX(inX), mY(inY), mWidth(inWidth), mHeight(inHeight), mInnerX(inInnerX), mInnerY(inInnerY), mInnerWidth(inInnerWidth), mInnerHeight(inInnerHeight) { }
 							UITexturedQuad(const Texture *inTexture, int inX, int inY, int inWidth, int inHeight, int inInnerX, int inInnerY, int inInnerWidth, int inInnerHeight) : mTexture(inTexture), mX(inX), mY(inY), mWidth(inWidth), mHeight(inHeight), mInnerX(inInnerX), mInnerY(inInnerY), mInnerWidth(inInnerWidth), mInnerHeight(inInnerHeight) { }

+ 1 - 1
UnitTests/ObjectStream/ObjectStreamTest.cpp

@@ -20,7 +20,7 @@ class TestSerializableBase : public RefTarget<TestSerializableBase>
 	JPH_DECLARE_SERIALIZABLE_VIRTUAL_BASE(TestSerializableBase)
 	JPH_DECLARE_SERIALIZABLE_VIRTUAL_BASE(TestSerializableBase)
 
 
 public:
 public:
-	virtual						~TestSerializableBase() { }
+	virtual						~TestSerializableBase() = default;
 
 
 	uint8						mUInt8 = 0;
 	uint8						mUInt8 = 0;
 	uint16						mUInt16 = 0;
 	uint16						mUInt16 = 0;