From bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 12 Dec 2016 20:26:59 +0300 Subject: Add noexcept in some files. --- src/vector.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/vector.h') diff --git a/src/vector.h b/src/vector.h index 7d72df517..6e23079f0 100644 --- a/src/vector.h +++ b/src/vector.h @@ -69,12 +69,12 @@ class Vector final * Returns true if all coordinates are set to 0, otherwise returns * false. */ - bool isNull() const A_WARN_UNUSED + bool isNull() const noexcept2 A_WARN_UNUSED { return x == 0.0F && y == 0.0F && z == 0.0F; } - Vector &operator=(const Vector &v) + Vector &operator=(const Vector &v) noexcept2 { x = v.x; y = v.y; @@ -85,7 +85,7 @@ class Vector final /** * Scale vector operator. */ - Vector operator*(const float c) const A_WARN_UNUSED + Vector operator*(const float c) const noexcept2 A_WARN_UNUSED { return Vector(x * c, y * c, @@ -95,7 +95,7 @@ class Vector final /** * In-place scale vector operator. */ - Vector &operator*=(const float c) + Vector &operator*=(const float c) noexcept2 { x *= c; y *= c; @@ -106,7 +106,7 @@ class Vector final /** * Scale vector operator. */ - Vector operator/(const float c) const A_WARN_UNUSED + Vector operator/(const float c) const noexcept2 A_WARN_UNUSED { return Vector(x / c, y / c, @@ -116,7 +116,7 @@ class Vector final /** * In-place scale vector operator. */ - Vector &operator/=(const float c) A_WARN_UNUSED + Vector &operator/=(const float c) noexcept2 A_WARN_UNUSED { x /= c; y /= c; @@ -127,7 +127,7 @@ class Vector final /** * Add vector operator. */ - Vector operator+(const Vector &v) const A_WARN_UNUSED + Vector operator+(const Vector &v) const noexcept2 A_WARN_UNUSED { return Vector(x + v.x, y + v.y, @@ -137,7 +137,7 @@ class Vector final /** * In-place add vector operator. */ - Vector &operator+=(const Vector &v) + Vector &operator+=(const Vector &v) noexcept2 { x += v.x; y += v.y; @@ -148,7 +148,7 @@ class Vector final /** * Subtract vector operator. */ - Vector operator-(const Vector &v) const A_WARN_UNUSED + Vector operator-(const Vector &v) const noexcept2 A_WARN_UNUSED { return Vector(x - v.x, y - v.y, @@ -158,7 +158,7 @@ class Vector final /** * In-place subtract vector operator. */ - Vector &operator-=(const Vector &v) + Vector &operator-=(const Vector &v) noexcept2 { x -= v.x; y -= v.y; @@ -178,7 +178,7 @@ class Vector final /** * Returns the squared length of this vector. Avoids the square root. */ - float squaredLength() const A_WARN_UNUSED + float squaredLength() const noexcept2 A_WARN_UNUSED { return x * x + y * y + z * z; } -- cgit v1.2.3-60-g2f50