Browse Source

Fixed warnings with new Xcode

Thomas Buck 11 years ago
parent
commit
efecb6eea3
13 changed files with 13 additions and 60 deletions
  1. 6
    0
      ChangeLog
  2. 0
    5
      include/Camera.h
  3. 0
    5
      include/Matrix.h
  4. 0
    5
      include/Particle.h
  5. 0
    12
      include/Quaternion.h
  6. 3
    2
      include/Vector3d.h
  7. 0
    5
      include/ViewVolume.h
  8. 0
    3
      src/Camera.cpp
  9. 0
    3
      src/Matrix.cpp
  10. 0
    5
      src/Particle.cpp
  11. 0
    11
      src/Quaternion.cpp
  12. 4
    1
      src/Vector3d.cpp
  13. 0
    3
      src/ViewVolume.cpp

+ 6
- 0
ChangeLog View File

5
 
5
 
6
  OpenRaider (0.1.2) xythobuz <xythobuz@xythobuz.de>
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
 	[ 20140307 ]
14
 	[ 20140307 ]
9
 	* Removed duplicated GL initialization code
15
 	* Removed duplicated GL initialization code
10
 	* Removed duplicated TGA writing code from Texture
16
 	* Removed duplicated TGA writing code from Texture

+ 0
- 5
include/Camera.h View File

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

+ 0
- 5
include/Matrix.h View File

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

+ 0
- 5
include/Particle.h View File

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

+ 0
- 12
include/Quaternion.h View File

37
     Quaternion(vec4_t v);
37
     Quaternion(vec4_t v);
38
 
38
 
39
     /*!
39
     /*!
40
-     * \brief Deconstructs an object of Quaternion
41
-     */
42
-    ~Quaternion();
43
-
44
-    /*!
45
      * \brief Get column order matrix equivalent of this quaternion
40
      * \brief Get column order matrix equivalent of this quaternion
46
      * \param m where matrix will be stored
41
      * \param m where matrix will be stored
47
      */
42
      */
48
     void getMatrix(matrix_t m);
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
      * \brief Multiplies this quaternion.
46
      * \brief Multiplies this quaternion.
59
      *
47
      *
60
      * Use normalize() call for unit quaternion.
48
      * Use normalize() call for unit quaternion.

+ 3
- 2
include/Vector3d.h View File

36
     Vector3d(vec_t x, vec_t y, vec_t z);
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
      * \brief Calculate dot product
45
      * \brief Calculate dot product

+ 0
- 5
include/ViewVolume.h View File

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

+ 0
- 3
src/Camera.cpp View File

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

+ 0
- 3
src/Matrix.cpp View File

24
     setMatrix(m);
24
     setMatrix(m);
25
 }
25
 }
26
 
26
 
27
-Matrix::~Matrix() {
28
-}
29
-
30
 bool Matrix::getInvert(matrix_t out) {
27
 bool Matrix::getInvert(matrix_t out) {
31
     matrix_t m;
28
     matrix_t m;
32
 
29
 

+ 0
- 5
src/Particle.cpp View File

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

+ 0
- 11
src/Quaternion.cpp View File

30
     mZ = v[3];
30
     mZ = v[3];
31
 }
31
 }
32
 
32
 
33
-Quaternion::~Quaternion() {
34
-}
35
-
36
 void Quaternion::getMatrix(matrix_t m) {
33
 void Quaternion::getMatrix(matrix_t m) {
37
     m[ 0] = 1.0f - 2.0f * (mY*mY + mZ*mZ);
34
     m[ 0] = 1.0f - 2.0f * (mY*mY + mZ*mZ);
38
     m[ 1] = 2.0f * (mX*mY - mW*mZ);
35
     m[ 1] = 2.0f * (mX*mY - mW*mZ);
55
     m[15] = 1.0f;
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
 Quaternion Quaternion::operator *(const Quaternion &q) {
55
 Quaternion Quaternion::operator *(const Quaternion &q) {
67
     return multiply(*this, q);
56
     return multiply(*this, q);
68
 }
57
 }

+ 4
- 1
src/Vector3d.cpp View File

25
     mVec[2] = z;
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
 vec_t Vector3d::dot(const Vector3d &u, const Vector3d &v) {
34
 vec_t Vector3d::dot(const Vector3d &u, const Vector3d &v) {

+ 0
- 3
src/ViewVolume.cpp View File

20
     mFrustum[5][0] = mFrustum[5][1] = mFrustum[5][2] = mFrustum[5][3] = 0.0f;
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
 bool ViewVolume::isBoundingVolumeInFrustum(BoundingVolume bvol) {
23
 bool ViewVolume::isBoundingVolumeInFrustum(BoundingVolume bvol) {
27
     return (isBoundingSphereInFrustum(bvol.mSphere) &&
24
     return (isBoundingSphereInFrustum(bvol.mSphere) &&
28
             isBoundingBoxInFrustum(bvol.mBox));
25
             isBoundingBoxInFrustum(bvol.mBox));

Loading…
Cancel
Save