From 2005028424883e1ad931091117e80afdc358372c Mon Sep 17 00:00:00 2001 From: Myles Busig Date: Sun, 18 Aug 2024 23:50:14 -0700 Subject: [PATCH] Fix initializer list reordering warnings Caused because initializer list must be in the same order as the member declarations. --- include/mtl/string.hpp | 2 +- include/mtl/vector.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mtl/string.hpp b/include/mtl/string.hpp index 3284cb0..70b1f63 100644 --- a/include/mtl/string.hpp +++ b/include/mtl/string.hpp @@ -19,8 +19,8 @@ namespace mtl { class istring { protected: char* m_str; - size_t m_size; size_t m_capacity; + size_t m_size; public: static constexpr const size_t npos = -1; diff --git a/include/mtl/vector.hpp b/include/mtl/vector.hpp index 6738b93..a356592 100644 --- a/include/mtl/vector.hpp +++ b/include/mtl/vector.hpp @@ -18,8 +18,8 @@ template class ivector { private: T* m_arr; - size_t m_size; const size_t m_capacity; + size_t m_size; public: using value_type = T;