From c2584020aa294bd0e9328729532a0adab7a29409 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 14 Feb 2011 01:26:26 +0000 Subject: [PATCH] Do not zero vector memory upon initialisation. Unitialised is uninitialised. --- src/matrix.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/matrix.h b/src/matrix.h index b407ed64..f58de454 100644 --- a/src/matrix.h +++ b/src/matrix.h @@ -104,7 +104,7 @@ template struct Vec4; template struct Vec2 { - inline Vec2() { x = y = 0; } + inline Vec2() { } inline Vec2(T val) { x = y = val; } inline Vec2(T _x, T _y) { x = _x; y = _y; } @@ -119,7 +119,7 @@ typedef Vec2 int2; template struct Vec3 { - inline Vec3() { x = y = z = 0; } + inline Vec3() { } inline Vec3(T val) { x = y = z = val; } inline Vec3(T _x, T _y, T _z) { x = _x; y = _y; z = _z; } @@ -135,7 +135,7 @@ typedef Vec3 int3; template struct Vec4 { - inline Vec4() { x = y = z = w = 0; } + inline Vec4() { } inline Vec4(T val) { x = y = z = w = val; } inline Vec4(T _x, T _y, T _z, T _w) { x = _x; y = _y; z = _z; w = _w; } @@ -177,7 +177,7 @@ GLOBALS(4) template struct Vec4x4 { - inline Vec4x4() { v[0] = v[1] = v[2] = v[3] = 0; } + inline Vec4x4() { } inline Vec4x4(T val) { v[0] = v[1] = v[2] = v[3] = val; } inline Vec4x4(Vec4 v0, Vec4 v1, Vec4 v2, Vec4 v3) { v[0] = v0; v[1] = v1; v[2] = v2; v[3] = v3; }