Parcourir la source

Fixed warnings with new Xcode

Thomas Buck il y a 10 ans
Parent
révision
efecb6eea3

+ 6
- 0
ChangeLog Voir le fichier

@@ -5,6 +5,12 @@
5 5
 
6 6
  OpenRaider (0.1.2) xythobuz <xythobuz@xythobuz.de>
7 7
 
8
+	[ 20140311 ]
9
+	* Removed empty Camera, Matrix, Particle, Quaternion,
10
+	  Vector3d and ViewVolume destructors
11
+	* Removed unneeded Quaternion assignment operator
12
+	* Added Vector3d copy constructor
13
+
8 14
 	[ 20140307 ]
9 15
 	* Removed duplicated GL initialization code
10 16
 	* Removed duplicated TGA writing code from Texture

+ 0
- 5
include/Camera.h Voir le fichier

@@ -66,11 +66,6 @@ public:
66 66
     Camera();
67 67
 
68 68
     /*!
69
-     * \brief Deconstructs an object of Camera
70
-     */
71
-    ~Camera();
72
-
73
-    /*!
74 69
      * \brief Returns the current position
75 70
      * \param pos where the position will be stored
76 71
      */

+ 0
- 5
include/Matrix.h Voir le fichier

@@ -55,11 +55,6 @@ public:
55 55
     Matrix(Quaternion &q);
56 56
 
57 57
     /*!
58
-     * \brief Deconstructs an object of Matrix
59
-     */
60
-    ~Matrix();
61
-
62
-    /*!
63 58
      * \brief Returns this matrix copy
64 59
      * \param mat target
65 60
      */

+ 0
- 5
include/Particle.h Voir le fichier

@@ -22,11 +22,6 @@ public:
22 22
     Particle();
23 23
 
24 24
     /*!
25
-     * \brief Deconstructs an object of Sound
26
-     */
27
-    ~Particle();
28
-
29
-    /*!
30 25
      * \brief Toggles active state of particle
31 26
      * \param active new state
32 27
      */

+ 0
- 12
include/Quaternion.h Voir le fichier

@@ -37,24 +37,12 @@ public:
37 37
     Quaternion(vec4_t v);
38 38
 
39 39
     /*!
40
-     * \brief Deconstructs an object of Quaternion
41
-     */
42
-    ~Quaternion();
43
-
44
-    /*!
45 40
      * \brief Get column order matrix equivalent of this quaternion
46 41
      * \param m where matrix will be stored
47 42
      */
48 43
     void getMatrix(matrix_t m);
49 44
 
50 45
     /*!
51
-     * \brief Assign q to this quaternion
52
-     * \param q what to assign this quaternion to
53
-     * \returns this quaternion
54
-     */
55
-    Quaternion &operator =(const Quaternion &q);
56
-
57
-    /*!
58 46
      * \brief Multiplies this quaternion.
59 47
      *
60 48
      * Use normalize() call for unit quaternion.

+ 3
- 2
include/Vector3d.h Voir le fichier

@@ -36,9 +36,10 @@ public:
36 36
     Vector3d(vec_t x, vec_t y, vec_t z);
37 37
 
38 38
     /*!
39
-     * \brief Deconstructs an object of Vector3d
39
+     * \brief Constructs an object of Vector3d
40
+     * \param v contents of new Vector3d
40 41
      */
41
-    ~Vector3d();
42
+    Vector3d(const Vector3d &v);
42 43
 
43 44
     /*!
44 45
      * \brief Calculate dot product

+ 0
- 5
include/ViewVolume.h Voir le fichier

@@ -71,11 +71,6 @@ public:
71 71
     ViewVolume();
72 72
 
73 73
     /*!
74
-     * \brief Deconstructs an object of ViewVolume
75
-     */
76
-    ~ViewVolume();
77
-
78
-    /*!
79 74
      * \brief Check if bounding volume is in view volume
80 75
      * \param bvol bounding volume to check
81 76
      * \returns true if frustum contains the given bounding volume

+ 0
- 3
src/Camera.cpp Voir le fichier

@@ -21,9 +21,6 @@ Camera::Camera() {
21 21
     reset();
22 22
 }
23 23
 
24
-Camera::~Camera() {
25
-}
26
-
27 24
 void Camera::getPosition(vec3_t pos) {
28 25
     pos[0] = mPos[0];
29 26
     pos[1] = mPos[1];

+ 0
- 3
src/Matrix.cpp Voir le fichier

@@ -24,9 +24,6 @@ Matrix::Matrix(Quaternion &q) {
24 24
     setMatrix(m);
25 25
 }
26 26
 
27
-Matrix::~Matrix() {
28
-}
29
-
30 27
 bool Matrix::getInvert(matrix_t out) {
31 28
     matrix_t m;
32 29
 

+ 0
- 5
src/Particle.cpp Voir le fichier

@@ -22,11 +22,6 @@ Particle::Particle()
22 22
 }
23 23
 
24 24
 
25
-Particle::~Particle()
26
-{
27
-}
28
-
29
-
30 25
 void Particle::TextureId(int id)
31 26
 {
32 27
     _texture = id;

+ 0
- 11
src/Quaternion.cpp Voir le fichier

@@ -30,9 +30,6 @@ Quaternion::Quaternion(vec4_t v) {
30 30
     mZ = v[3];
31 31
 }
32 32
 
33
-Quaternion::~Quaternion() {
34
-}
35
-
36 33
 void Quaternion::getMatrix(matrix_t m) {
37 34
     m[ 0] = 1.0f - 2.0f * (mY*mY + mZ*mZ);
38 35
     m[ 1] = 2.0f * (mX*mY - mW*mZ);
@@ -55,14 +52,6 @@ void Quaternion::getMatrix(matrix_t m) {
55 52
     m[15] = 1.0f;
56 53
 }
57 54
 
58
-Quaternion &Quaternion::operator =(const Quaternion &q) {
59
-    mW  = q.mW;
60
-    mX = q.mX;
61
-    mY = q.mY;
62
-    mZ = q.mZ;
63
-    return *this;
64
-}
65
-
66 55
 Quaternion Quaternion::operator *(const Quaternion &q) {
67 56
     return multiply(*this, q);
68 57
 }

+ 4
- 1
src/Vector3d.cpp Voir le fichier

@@ -25,7 +25,10 @@ Vector3d::Vector3d(vec_t x, vec_t y, vec_t z) {
25 25
     mVec[2] = z;
26 26
 }
27 27
 
28
-Vector3d::~Vector3d() {
28
+Vector3d::Vector3d(const Vector3d &v) {
29
+    mVec[0] = v.mVec[0];
30
+    mVec[1] = v.mVec[1];
31
+    mVec[2] = v.mVec[2];
29 32
 }
30 33
 
31 34
 vec_t Vector3d::dot(const Vector3d &u, const Vector3d &v) {

+ 0
- 3
src/ViewVolume.cpp Voir le fichier

@@ -20,9 +20,6 @@ ViewVolume::ViewVolume() {
20 20
     mFrustum[5][0] = mFrustum[5][1] = mFrustum[5][2] = mFrustum[5][3] = 0.0f;
21 21
 }
22 22
 
23
-ViewVolume::~ViewVolume() {
24
-}
25
-
26 23
 bool ViewVolume::isBoundingVolumeInFrustum(BoundingVolume bvol) {
27 24
     return (isBoundingSphereInFrustum(bvol.mSphere) &&
28 25
             isBoundingBoxInFrustum(bvol.mBox));

Chargement…
Annuler
Enregistrer