From 3a407bb6b73a186eafd99bcec570f88097c4b2e1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 4 Sep 2012 19:11:53 +0300 Subject: Add const to more classes. --- src/vector.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/vector.h') 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; -- cgit v1.2.3-70-g09d2