From 1cd4edcac415b53f8f9c325f41d3035b91055ceb Mon Sep 17 00:00:00 2001 From: dooglus Date: Thu, 27 Sep 2007 15:10:49 +0000 Subject: [PATCH] vector.h was assuming that its members would be laid out consequtively in memory, without padding. Is this a safe assumption? Note that the same assumption is made in class bezier_base in the same file, but I didn't change that yet. git-svn-id: http://svn.voria.com/code@775 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/vector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synfig-core/trunk/src/synfig/vector.h b/synfig-core/trunk/src/synfig/vector.h index 61314f1..13a3805 100644 --- a/synfig-core/trunk/src/synfig/vector.h +++ b/synfig-core/trunk/src/synfig/vector.h @@ -79,11 +79,11 @@ public: value_type & operator[](const int& i) - { return (&_x)[i] ; } + { return i?_y:_x; } const value_type & operator[](const int& i) const - { return (&_x)[i] ; } + { return i?_y:_x; } const Vector & operator+=(const Vector &rhs) -- 2.7.4