diff --git a/src/array.h b/src/array.h index 30db4280..24e8ebde 100644 --- a/src/array.h +++ b/src/array.h @@ -80,7 +80,7 @@ public: return *this; } - inline void Append(T const &x) + inline void Push(T const &x) { *this << x; } @@ -187,8 +187,8 @@ template > { public: - inline void Append(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4, - T5 const &m5, T6 const &m6, T7 const &m7, T8 const &m8) + inline void Push(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4, + T5 const &m5, T6 const &m6, T7 const &m7, T8 const &m8) { if (this->m_count >= this->m_reserved) { @@ -225,8 +225,8 @@ class Array : public ArrayBase > { public: - inline void Append(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4, - T5 const &m5, T6 const &m6, T7 const &m7) + inline void Push(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4, + T5 const &m5, T6 const &m6, T7 const &m7) { if (this->m_count >= this->m_reserved) { @@ -261,8 +261,8 @@ class Array : public ArrayBase > { public: - inline void Append(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4, - T5 const &m5, T6 const &m6) + inline void Push(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4, + T5 const &m5, T6 const &m6) { if (this->m_count >= this->m_reserved) { @@ -294,8 +294,8 @@ class Array : public ArrayBase > { public: - inline void Append(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4, - T5 const &m5) + inline void Push(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4, + T5 const &m5) { if (this->m_count >= this->m_reserved) { @@ -325,7 +325,7 @@ class Array : public ArrayBase > { public: - inline void Append(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4) + inline void Push(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4) { if (this->m_count >= this->m_reserved) { @@ -352,7 +352,7 @@ class Array : public ArrayBase > { public: - inline void Append(T1 const &m1, T2 const &m2, T3 const &m3) + inline void Push(T1 const &m1, T2 const &m2, T3 const &m3) { if (this->m_count >= this->m_reserved) { @@ -377,7 +377,7 @@ class Array : public ArrayBase > { public: - inline void Append(T1 const &m1, T2 const &m2) + inline void Push(T1 const &m1, T2 const &m2) { if (this->m_count >= this->m_reserved) { diff --git a/test/tutorial/02_cube.cpp b/test/tutorial/02_cube.cpp index a1c81fbb..419e319c 100644 --- a/test/tutorial/02_cube.cpp +++ b/test/tutorial/02_cube.cpp @@ -35,15 +35,15 @@ public: m_angle = 0; /* Front vertices/colors */ - m_mesh.Append(vec3(-1.0, -1.0, 1.0), vec3(1.0, 0.0, 1.0)); - m_mesh.Append(vec3( 1.0, -1.0, 1.0), vec3(0.0, 1.0, 0.0)); - m_mesh.Append(vec3( 1.0, 1.0, 1.0), vec3(1.0, 0.5, 0.0)); - m_mesh.Append(vec3(-1.0, 1.0, 1.0), vec3(1.0, 1.0, 0.0)); + m_mesh.Push(vec3(-1.0, -1.0, 1.0), vec3(1.0, 0.0, 1.0)); + m_mesh.Push(vec3( 1.0, -1.0, 1.0), vec3(0.0, 1.0, 0.0)); + m_mesh.Push(vec3( 1.0, 1.0, 1.0), vec3(1.0, 0.5, 0.0)); + m_mesh.Push(vec3(-1.0, 1.0, 1.0), vec3(1.0, 1.0, 0.0)); /* Back */ - m_mesh.Append(vec3(-1.0, -1.0, -1.0), vec3(1.0, 0.0, 0.0)); - m_mesh.Append(vec3( 1.0, -1.0, -1.0), vec3(0.0, 0.5, 0.0)); - m_mesh.Append(vec3( 1.0, 1.0, -1.0), vec3(0.0, 0.5, 1.0)); - m_mesh.Append(vec3(-1.0, 1.0, -1.0), vec3(0.0, 0.0, 1.0)); + m_mesh.Push(vec3(-1.0, -1.0, -1.0), vec3(1.0, 0.0, 0.0)); + m_mesh.Push(vec3( 1.0, -1.0, -1.0), vec3(0.0, 0.5, 0.0)); + m_mesh.Push(vec3( 1.0, 1.0, -1.0), vec3(0.0, 0.5, 1.0)); + m_mesh.Push(vec3(-1.0, 1.0, -1.0), vec3(0.0, 0.0, 1.0)); m_indices << i16vec3(0, 1, 2); m_indices << i16vec3(2, 3, 0); diff --git a/test/unit/array.cpp b/test/unit/array.cpp index 8a0ea09b..8fbc415a 100644 --- a/test/unit/array.cpp +++ b/test/unit/array.cpp @@ -27,10 +27,10 @@ LOLUNIT_FIXTURE(ArrayTest) LOLUNIT_TEST(ArrayFill) { Array a; - a.Append(0); - a.Append(1); - a.Append(2); - a.Append(3); + a.Push(0); + a.Push(1); + a.Push(2); + a.Push(3); LOLUNIT_ASSERT_EQUAL(a[0], 0); LOLUNIT_ASSERT_EQUAL(a[1], 1); @@ -41,10 +41,10 @@ LOLUNIT_FIXTURE(ArrayTest) LOLUNIT_TEST(ArrayCopy) { Array a; - a.Append(0); - a.Append(1); - a.Append(2); - a.Append(3); + a.Push(0); + a.Push(1); + a.Push(2); + a.Push(3); Array b = a; @@ -57,7 +57,7 @@ LOLUNIT_FIXTURE(ArrayTest) LOLUNIT_TEST(EightElements) { Array a; - a.Append(1, 2, 3.f, 4.0, 5, 'a', true, 0); + a.Push(1, 2, 3.f, 4.0, 5, 'a', true, 0); LOLUNIT_ASSERT_EQUAL(a[0].m1, 1); LOLUNIT_ASSERT_EQUAL(a[0].m2, 2);