Skip to content

Commit 91d1afd

Browse files
committed
Fixed compilation bug related with property lists
1 parent dfedd21 commit 91d1afd

File tree

3 files changed

+8
-24
lines changed

3 files changed

+8
-24
lines changed

Spore ModAPI/SourceCode/App/PropertyList.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,12 @@ namespace App
8181
auto_METHOD_const(DirectPropertyList, bool, Write, Args(IO::IStream* pOutputStream), Args(pOutputStream));
8282
auto_METHOD_VOID_const(DirectPropertyList, GetPropertyIDs, Args(vector<uint32_t>& dst), Args(dst));
8383
auto_METHOD_VOID_(DirectPropertyList, Clear);
84+
85+
Property::Property(const Property& other)
86+
: mValueVector4(other.mValueVector4)
87+
, mnFlags(other.mnFlags)
88+
, mnType(other.mnType)
89+
{
90+
}
8491
}
8592
#endif

Spore ModAPI/Spore/App/Property.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ namespace App
110110

111111
public:
112112
Property();
113+
Property(const Property&);
113114
//TODO if flags & 4, does something special
114115
~Property();
115116

Spore ModAPI/Spore/MathUtils.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ namespace Math
5858
};
5959

6060
Color();
61-
Color(const Color& color);
6261
Color(uint32_t color);
6362
Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a);
6463

@@ -84,7 +83,6 @@ namespace Math
8483
float y;
8584

8685
Vector2(float x, float y);
87-
Vector2(const Vector2& other);
8886
Vector2(const Point& other);
8987
Vector2();
9088

@@ -119,7 +117,6 @@ namespace Math
119117
float z;
120118

121119
Vector3();
122-
Vector3(const Vector3& other);
123120
Vector3(float x, float y, float z);
124121

125122
/// Returns the length of the vector, computed as the square root of then sum of its components squared.
@@ -178,7 +175,6 @@ namespace Math
178175
float z;
179176
float w;
180177
Vector4(float x, float y, float z, float w);
181-
Vector4(const Vector4& other);
182178
Vector4();
183179

184180
/// Returns the length of the vector, computed as the square root of then sum of its components squared.
@@ -210,7 +206,6 @@ namespace Math
210206
struct Quaternion : public Vector4
211207
{
212208
Quaternion(float x, float y, float z, float w);
213-
Quaternion(const Quaternion& other);
214209
Quaternion();
215210

216211
/// Returns the inverse to this quaternion: that's another quaternion that, when multiplied with this one,
@@ -254,7 +249,6 @@ namespace Math
254249
float y;
255250

256251
Point(float x, float y);
257-
Point(const Point& other);
258252
Point(const Vector2& other);
259253
Point();
260254

@@ -408,7 +402,6 @@ namespace Math
408402
struct Matrix3 {
409403
float m[3][3];
410404
Matrix3();
411-
Matrix3(const Matrix3& other);
412405

413406
Vector3 Row(int index) const;
414407
Vector3 Column(int index) const;
@@ -455,7 +448,6 @@ namespace Math
455448
struct Matrix4 {
456449
float m[4][4];
457450
Matrix4();
458-
Matrix4(const Matrix4& other);
459451

460452
/// Turns this matrix into the identity matrix (1.0s in the diagonal, everything else 0.0s)
461453
/// Multiplying a matrix/vector with an identity matrix has no effect.
@@ -518,7 +510,6 @@ namespace Math
518510
float d;
519511

520512
PlaneEquation();
521-
PlaneEquation(const PlaneEquation& other);
522513
PlaneEquation(float a, float b, float c, float d);
523514
PlaneEquation(const Vector3& normal, const Vector3& point);
524515
PlaneEquation(const Vector3& u, const Vector3& v, const Vector3& point);
@@ -672,17 +663,11 @@ namespace Math
672663
}
673664

674665
inline Color::Color() : value(0) {}
675-
inline Color::Color(const Color& color) : value(color.value) {}
676666
inline Color::Color(uint32_t color) : value(color) {}
677667
inline Color::Color(uint8_t _r, uint8_t _g, uint8_t _b, uint8_t _a)
678668
: r(_r), g(_g), b(_b), a(_a) {}
679669

680-
inline Vector2::Vector2(const Vector2& other) : Vector2(other.x, other.y) {}
681670
inline Vector2::Vector2(const Point& other) : Vector2(other.x, other.y) {}
682-
inline Vector3::Vector3(const Vector3& other) : Vector3(other.x, other.y, other.z) {}
683-
inline Vector4::Vector4(const Vector4& other) : Vector4(other.x, other.y, other.z, other.w) {}
684-
inline Quaternion::Quaternion(const Quaternion& other) : Quaternion(other.x, other.y, other.z, other.w) {}
685-
inline Point::Point(const Point& other) : Point(other.x, other.y) {}
686671
inline Point::Point(const Vector2& other) : Point(other.x, other.y) {}
687672

688673
inline Vector2::Vector2(float _x, float _y) : x(_x), y(_y)
@@ -751,13 +736,6 @@ namespace Math
751736
inline Matrix3::Matrix3() : m() {}
752737
inline Matrix4::Matrix4() : m() {}
753738

754-
inline Matrix3::Matrix3(const Matrix3& other) {
755-
memcpy_s(m, sizeof(float) * 3 * 3, other.m, sizeof(float) * 3 * 3);
756-
}
757-
inline Matrix4::Matrix4(const Matrix4& other) {
758-
memcpy_s(m, sizeof(float) * 4 * 4, other.m, sizeof(float) * 4 * 4);
759-
}
760-
761739
inline Vector3 operator*(Matrix3 a, const Vector3& b) {
762740
return {
763741
a.m[0][0] * b.x + a.m[0][1] * b.y + a.m[0][2] * b.z,
@@ -792,8 +770,6 @@ namespace Math
792770
}
793771

794772
inline PlaneEquation::PlaneEquation() : a(), b(), c(), d() {}
795-
inline PlaneEquation::PlaneEquation(const PlaneEquation& other)
796-
: a(other.a), b(other.b), c(other.c), d(other.d) {}
797773
inline PlaneEquation::PlaneEquation(float a2, float b2, float c2, float d2)
798774
: a(a2), b(b2), c(c2), d(d2) {}
799775
inline PlaneEquation::PlaneEquation(const Vector3& normal, const Vector3& point) {

0 commit comments

Comments
 (0)