diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-04 19:11:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-04 19:11:53 +0300 |
commit | 3a407bb6b73a186eafd99bcec570f88097c4b2e1 (patch) | |
tree | ea57a752c348ba0a883294855ad3c62c16e9749d /src/vector.h | |
parent | 872fc368f7b253f26714fc47323064f270b62b40 (diff) | |
download | manaplus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.gz manaplus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.bz2 manaplus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.xz manaplus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.zip |
Add const to more classes.
Diffstat (limited to 'src/vector.h')
-rw-r--r-- | src/vector.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vector.h b/src/vector.h index 2caf48418..93957a90d 100644 --- a/src/vector.h +++ b/src/vector.h @@ -46,7 +46,7 @@ class Vector /** * Constructor. */ - Vector(float x0, float y0, float z0 = 0.0f): + Vector(const float x0, const float y0, const float z0 = 0.0f) : x(x0), y(y0), z(z0) @@ -73,7 +73,7 @@ class Vector /** * Scale vector operator. */ - Vector operator*(float c) const + Vector operator*(const float c) const { return Vector(x * c, y * c, @@ -83,7 +83,7 @@ class Vector /** * In-place scale vector operator. */ - Vector &operator*=(float c) + Vector &operator*=(const float c) { x *= c; y *= c; @@ -94,7 +94,7 @@ class Vector /** * Scale vector operator. */ - Vector operator/(float c) const + Vector operator/(const float c) const { return Vector(x / c, y / c, @@ -104,7 +104,7 @@ class Vector /** * In-place scale vector operator. */ - Vector &operator/=(float c) + Vector &operator/=(const float c) { x /= c; y /= c; |