diff --git a/src/libraries/util/util/vector.h b/src/libraries/util/util/vector.h index c177c17..9c5f544 100644 --- a/src/libraries/util/util/vector.h +++ b/src/libraries/util/util/vector.h @@ -110,13 +110,23 @@ public: /// Add an item onto the array by copying it. /// \arg item The item to add /// \returns A reference to the added item - T & append(const T& item) + T & append(const T &item) { ensure_capacity(m_size + 1); m_elements[m_size] = item; return m_elements[m_size++]; } + /// Add an item onto the array by copying it. + /// \arg item The item to add + /// \returns A reference to the added item + T & append(T &&item) + { + ensure_capacity(m_size + 1); + m_elements[m_size] = std::move(item); + return m_elements[m_size++]; + } + /// Construct an item in place onto the end of the array. /// \returns A reference to the added item template