Prechádzať zdrojové kódy

Fixes for MSVC 17.7.0 Preview 3 compilation errors (#615)

Fixes #614
Timo Suoranta 2 rokov pred
rodič
commit
4c0a700dba

+ 1 - 0
Jolt/Core/Color.h

@@ -18,6 +18,7 @@ public:
 	/// Constructors
 							Color() = default; ///< Intentionally not initialized for performance reasons
 							Color(const Color &inRHS) = default;
+	Color &					operator = (const Color &inRHS) = default;
 	explicit constexpr		Color(uint32 inColor)													: mU32(inColor) { }
 	constexpr				Color(uint8 inRed, uint8 inGreen, uint8 inBlue, uint8 inAlpha = 255)	: r(inRed), g(inGreen), b(inBlue), a(inAlpha) { }
 	constexpr				Color(ColorArg inRHS, uint8 inAlpha)									: r(inRHS.r), g(inRHS.g), b(inRHS.b), a(inAlpha) { }

+ 1 - 0
Jolt/Math/DMat44.h

@@ -26,6 +26,7 @@ public:
 								DMat44() = default; ///< Intentionally not initialized for performance reasons
 	JPH_INLINE					DMat44(Vec4Arg inC1, Vec4Arg inC2, Vec4Arg inC3, DVec3Arg inC4);
 								DMat44(const DMat44 &inM2) = default;
+	DMat44 &					operator = (const DMat44 &inM2) = default;
 	JPH_INLINE explicit			DMat44(Mat44Arg inM);
 	JPH_INLINE					DMat44(Mat44Arg inRot, DVec3Arg inT);
 	JPH_INLINE					DMat44(Type inC1, Type inC2, Type inC3, DTypeArg inC4);

+ 1 - 0
Jolt/Math/DVec3.h

@@ -36,6 +36,7 @@ public:
 	/// Constructor
 								DVec3() = default; ///< Intentionally not initialized for performance reasons
 								DVec3(const DVec3 &inRHS) = default;
+	DVec3 &						operator = (const DVec3 &inRHS) = default;
 	JPH_INLINE explicit			DVec3(Vec3Arg inRHS);
 	JPH_INLINE explicit			DVec3(Vec4Arg inRHS);
 	JPH_INLINE					DVec3(TypeArg inRHS) : mValue(inRHS)			{ CheckW(); }

+ 1 - 0
Jolt/Math/Double3.h

@@ -16,6 +16,7 @@ public:
 
 				Double3() = default; ///< Intentionally not initialized for performance reasons
 				Double3(const Double3 &inRHS) = default;
+	Double3 &	operator = (const Double3 &inRHS) = default;
 				Double3(double inX, double inY, double inZ) : x(inX), y(inY), z(inZ) { }
 
 	double		operator [] (int inCoordinate) const	

+ 1 - 0
Jolt/Math/Float2.h

@@ -14,6 +14,7 @@ public:
 
 						Float2() = default; ///< Intentionally not initialized for performance reasons
 						Float2(const Float2 &inRHS) = default;
+	Float2 &			operator = (const Float2 &inRHS) = default;
 						Float2(float inX, float inY)					: x(inX), y(inY) { }
 
 	bool				operator == (const Float2 &inRHS) const			{ return x == inRHS.x && y == inRHS.y; }

+ 1 - 0
Jolt/Math/Float3.h

@@ -16,6 +16,7 @@ public:
 
 				Float3() = default; ///< Intentionally not initialized for performance reasons
 				Float3(const Float3 &inRHS) = default;
+	Float3 &	operator = (const Float3 &inRHS) = default;
 				Float3(float inX, float inY, float inZ) : x(inX), y(inY), z(inZ) { }
 
 	float		operator [] (int inCoordinate) const	

+ 1 - 0
Jolt/Math/Mat44.h

@@ -25,6 +25,7 @@ public:
 	JPH_INLINE					Mat44(Vec4Arg inC1, Vec4Arg inC2, Vec4Arg inC3, Vec4Arg inC4);
 	JPH_INLINE					Mat44(Vec4Arg inC1, Vec4Arg inC2, Vec4Arg inC3, Vec3Arg inC4);
 								Mat44(const Mat44 &inM2) = default;
+	Mat44 &						operator = (const Mat44 &inM2) = default;
 	JPH_INLINE					Mat44(Type inC1, Type inC2, Type inC3, Type inC4);
 
 	/// Zero matrix

+ 1 - 0
Jolt/Math/Quat.h

@@ -38,6 +38,7 @@ public:
 	///@{
 	inline						Quat() = default; ///< Intentionally not initialized for performance reasons
 								Quat(const Quat &inRHS) = default;
+	Quat &						operator = (const Quat &inRHS) = default;
 	inline						Quat(float inX, float inY, float inZ, float inW)				: mValue(inX, inY, inZ, inW) { }
 	inline explicit				Quat(Vec4Arg inV)												: mValue(inV) { }
 	///@}

+ 1 - 0
Jolt/Math/UVec4.h

@@ -25,6 +25,7 @@ public:
 	/// Constructor
 								UVec4() = default; ///< Intentionally not initialized for performance reasons
 								UVec4(const UVec4 &inRHS) = default;
+	UVec4 &						operator = (const UVec4 &inRHS) = default;
 	JPH_INLINE					UVec4(Type inRHS) : mValue(inRHS)					{ }
 
 	/// Create a vector from 4 integer components

+ 1 - 0
Jolt/Math/Vec3.h

@@ -32,6 +32,7 @@ public:
 	/// Constructor
 								Vec3() = default; ///< Intentionally not initialized for performance reasons
 								Vec3(const Vec3 &inRHS) = default;
+	Vec3 &						operator = (const Vec3 &inRHS) = default;
 	explicit JPH_INLINE			Vec3(Vec4Arg inRHS);
 	JPH_INLINE					Vec3(Type inRHS) : mValue(inRHS)				{ CheckW(); }
 

+ 1 - 0
Jolt/Math/Vec4.h

@@ -27,6 +27,7 @@ public:
 	/// Constructor
 								Vec4() = default; ///< Intentionally not initialized for performance reasons
 								Vec4(const Vec4 &inRHS) = default;
+	Vec4 &						operator = (const Vec4 &inRHS) = default;
 	explicit JPH_INLINE			Vec4(Vec3Arg inRHS);							///< WARNING: W component undefined!
 	JPH_INLINE					Vec4(Vec3Arg inRHS, float inW);
 	JPH_INLINE					Vec4(Type inRHS) : mValue(inRHS)				{ }

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

@@ -53,6 +53,7 @@ public:
 	/// Constructor to initialize from another collector
 	template <class ResultTypeArg2>
 	explicit				CollisionCollector(const CollisionCollector<ResultTypeArg2, TraitsType> &inRHS) : mEarlyOutFraction(inRHS.GetEarlyOutFraction()), mContext(inRHS.GetContext()) { }
+							CollisionCollector(const CollisionCollector<ResultTypeArg, TraitsType> &inRHS) = default;
 
 	/// Destructor
 	virtual					~CollisionCollector() = default;

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

@@ -19,6 +19,7 @@ public:
 	/// Constructor
 							SubShapeIDPair() = default;
 							SubShapeIDPair(const BodyID &inBody1ID, const SubShapeID &inSubShapeID1, const BodyID &inBody2ID, const SubShapeID &inSubShapeID2) : mBody1ID(inBody1ID), mSubShapeID1(inSubShapeID1), mBody2ID(inBody2ID), mSubShapeID2(inSubShapeID2) { }
+	SubShapeIDPair &		operator = (const SubShapeIDPair &) = default;
 							SubShapeIDPair(const SubShapeIDPair &) = default;
 
 	/// Equality operator

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

@@ -30,6 +30,7 @@ public:
 	/// Constructor
 							MotorSettings() = default;
 							MotorSettings(const MotorSettings &) = default;
+	MotorSettings &			operator = (const MotorSettings &) = default;
 							MotorSettings(float inFrequency, float inDamping) : mSpringSettings(ESpringMode::FrequencyAndDamping, inFrequency, inDamping) { JPH_ASSERT(IsValid()); }
 							MotorSettings(float inFrequency, float inDamping, float inForceLimit, float inTorqueLimit) : mSpringSettings(ESpringMode::FrequencyAndDamping, inFrequency, inDamping), mMinForceLimit(-inForceLimit), mMaxForceLimit(inForceLimit), mMinTorqueLimit(-inTorqueLimit), mMaxTorqueLimit(inTorqueLimit) { JPH_ASSERT(IsValid()); }
 

+ 1 - 0
Jolt/Physics/Constraints/SpringSettings.h

@@ -27,6 +27,7 @@ public:
 	/// Constructor
 								SpringSettings() = default;
 								SpringSettings(const SpringSettings &) = default;
+	SpringSettings &			operator = (const SpringSettings &) = default;
 								SpringSettings(ESpringMode inMode, float inFrequencyOrStiffness, float inDamping) : mMode(inMode), mFrequency(inFrequencyOrStiffness), mDamping(inDamping) { }
 
 	/// Saves the contents of the spring settings in binary form to inStream.