summaryrefslogtreecommitdiff
path: root/src/vector.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-30 01:19:46 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-30 13:11:34 +0300
commit6b1684d33dec02eb6308bb3d8d3707f4d5252ba5 (patch)
tree4a0a5fd220828b92ef96446fe38dbe67ff446c6c /src/vector.h
parent2a70a50c785ce639b76141a3a6887836d22fe12c (diff)
downloadmanaplus-6b1684d33dec02eb6308bb3d8d3707f4d5252ba5.tar.gz
manaplus-6b1684d33dec02eb6308bb3d8d3707f4d5252ba5.tar.bz2
manaplus-6b1684d33dec02eb6308bb3d8d3707f4d5252ba5.tar.xz
manaplus-6b1684d33dec02eb6308bb3d8d3707f4d5252ba5.zip
Add unused warnings to some files.
Diffstat (limited to 'src/vector.h')
-rw-r--r--src/vector.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/vector.h b/src/vector.h
index 587344f39..1e8caec00 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -67,7 +67,7 @@ class Vector final
* Returns true if all coordinates are set to 0, otherwise returns
* false.
*/
- bool isNull() const
+ bool isNull() const A_WARN_UNUSED
{
return x == 0.0f && y == 0.0f && z == 0.0f;
}
@@ -75,7 +75,7 @@ class Vector final
/**
* Scale vector operator.
*/
- Vector operator*(const float c) const
+ Vector operator*(const float c) const A_WARN_UNUSED
{
return Vector(x * c,
y * c,
@@ -96,7 +96,7 @@ class Vector final
/**
* Scale vector operator.
*/
- Vector operator/(const float c) const
+ Vector operator/(const float c) const A_WARN_UNUSED
{
return Vector(x / c,
y / c,
@@ -106,7 +106,7 @@ class Vector final
/**
* In-place scale vector operator.
*/
- Vector &operator/=(const float c)
+ Vector &operator/=(const float c) A_WARN_UNUSED
{
x /= c;
y /= c;
@@ -117,7 +117,7 @@ class Vector final
/**
* Add vector operator.
*/
- Vector operator+(const Vector &v) const
+ Vector operator+(const Vector &v) const A_WARN_UNUSED
{
return Vector(x + v.x,
y + v.y,
@@ -138,7 +138,7 @@ class Vector final
/**
* Subtract vector operator.
*/
- Vector operator-(const Vector &v) const
+ Vector operator-(const Vector &v) const A_WARN_UNUSED
{
return Vector(x - v.x,
y - v.y,
@@ -160,7 +160,7 @@ class Vector final
* Returns the length of this vector. This method does a relatively
* slow square root.
*/
- float length() const
+ float length() const A_WARN_UNUSED
{
return sqrtf(x * x + y * y + z * z);
}
@@ -168,7 +168,7 @@ class Vector final
/**
* Returns the squared length of this vector. Avoids the square root.
*/
- float squaredLength() const
+ float squaredLength() const A_WARN_UNUSED
{
return x * x + y * y + z * z;
}
@@ -176,7 +176,7 @@ class Vector final
/**
* Returns the manhattan length of this vector.
*/
- float manhattanLength() const
+ float manhattanLength() const A_WARN_UNUSED
{
return fabsf(x) + fabsf(y) + fabsf(z);
}
@@ -185,7 +185,7 @@ class Vector final
* Returns a normalized version of this vector. This is a unit vector
* running parallel to it.
*/
- Vector normalized() const
+ Vector normalized() const A_WARN_UNUSED
{
const float len = length();
return Vector(x / len, y / len, z / len);