[ox/mc] Add Vector handler to DefWriter, add static_assert tests

This commit is contained in:
2019-02-12 03:58:14 +00:00
parent 1c6e40220b
commit 5c51e17156
2 changed files with 40 additions and 12 deletions

View File

@ -43,6 +43,8 @@ class Vector {
void resize(std::size_t size) noexcept;
T *data();
bool contains(T) const noexcept;
void push_back(const T &item) noexcept;
@ -153,6 +155,11 @@ void Vector<T>::resize(std::size_t size) noexcept {
m_size = size;
}
template<typename T>
T *Vector<T>::data() {
return m_items;
}
template<typename T>
bool Vector<T>::contains(T v) const noexcept {
for (std::size_t i = 0; i < m_size; i++) {