diff --git a/src/array.h b/src/array.h index e7bd5b10..57a7fa90 100644 --- a/src/array.h +++ b/src/array.h @@ -40,7 +40,7 @@ public: return m_data[n]; } - inline Array const& operator+=(Element const &x) + inline Array const& operator<<(Element const &x) { if (m_count >= m_reserved) { @@ -127,7 +127,7 @@ public: return m_data[n]; } - inline Array const& operator+=(Element const &x) + inline Array const& operator<<(Element const &x) { if (m_count >= m_reserved) { @@ -210,7 +210,7 @@ public: return m_data[n]; } - inline Array const& operator+=(T1 const &x) + inline Array const& operator<<(T1 const &x) { if (m_count >= m_reserved) { @@ -227,7 +227,7 @@ public: inline void Append(T1 const &x) { - *this += x; + *this << x; } void Remove(int pos) diff --git a/test/tutorial/01_triangle.cpp b/test/tutorial/01_triangle.cpp index 1f342f59..bb6e3bbe 100644 --- a/test/tutorial/01_triangle.cpp +++ b/test/tutorial/01_triangle.cpp @@ -36,9 +36,9 @@ class Triangle : public WorldEntity public: Triangle() { - m_vertices += vec2( 0.0, 0.8); - m_vertices += vec2(-0.8, -0.8); - m_vertices += vec2( 0.8, -0.8); + m_vertices << vec2( 0.0, 0.8); + m_vertices << vec2(-0.8, -0.8); + m_vertices << vec2( 0.8, -0.8); m_ready = false; } diff --git a/test/tutorial/02_cube.cpp b/test/tutorial/02_cube.cpp index be691e6c..2c55bbd9 100644 --- a/test/tutorial/02_cube.cpp +++ b/test/tutorial/02_cube.cpp @@ -45,18 +45,18 @@ public: 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_indices += i16vec3(0, 1, 2); - m_indices += i16vec3(2, 3, 0); - m_indices += i16vec3(1, 5, 6); - m_indices += i16vec3(6, 2, 1); - m_indices += i16vec3(7, 6, 5); - m_indices += i16vec3(5, 4, 7); - m_indices += i16vec3(4, 0, 3); - m_indices += i16vec3(3, 7, 4); - m_indices += i16vec3(4, 5, 1); - m_indices += i16vec3(1, 0, 4); - m_indices += i16vec3(3, 2, 6); - m_indices += i16vec3(6, 7, 3); + m_indices << i16vec3(0, 1, 2); + m_indices << i16vec3(2, 3, 0); + m_indices << i16vec3(1, 5, 6); + m_indices << i16vec3(6, 2, 1); + m_indices << i16vec3(7, 6, 5); + m_indices << i16vec3(5, 4, 7); + m_indices << i16vec3(4, 0, 3); + m_indices << i16vec3(3, 7, 4); + m_indices << i16vec3(4, 5, 1); + m_indices << i16vec3(1, 0, 4); + m_indices << i16vec3(3, 2, 6); + m_indices << i16vec3(6, 7, 3); m_ready = false; }