diff --git a/include/etl/indirect_vector.h b/include/etl/indirect_vector.h index 99e64bdc..6fac471f 100644 --- a/include/etl/indirect_vector.h +++ b/include/etl/indirect_vector.h @@ -1166,7 +1166,6 @@ namespace etl : lookup(lookup_) , storage(storage_) { - ETL_ASSERT(lookup.capacity() <= storage.capacity(), ETL_ERROR(indirect_vector_buffer_missmatch)); } //********************************************************************* @@ -1374,7 +1373,6 @@ namespace etl indirect_vector() : etl::iindirect_vector(lookup_vector, storage_pool) { - this->initialise(); } //************************************************************************* @@ -1384,7 +1382,6 @@ namespace etl explicit indirect_vector(size_t initial_size) : etl::iindirect_vector(lookup_vector, storage_pool) { - this->initialise(); this->resize(initial_size); } @@ -1396,7 +1393,6 @@ namespace etl indirect_vector(size_t initial_size, typename etl::iindirect_vector::parameter_t value) : etl::iindirect_vector(lookup_vector, storage_pool) { - this->initialise(); this->resize(initial_size, value); } @@ -1498,7 +1494,7 @@ namespace etl indirect_vector(etl::ivector& lookup_, etl::ipool& pool_) : etl::iindirect_vector(lookup_, pool_) { - this->initialise(); + ETL_ASSERT(lookup_.capacity() <= pool_.capacity(), ETL_ERROR(indirect_vector_buffer_missmatch)); } //************************************************************************* @@ -1508,7 +1504,7 @@ namespace etl explicit indirect_vector(size_t initial_size, etl::ivector& lookup_, etl::ipool& pool_) : etl::iindirect_vector(lookup_, pool_) { - this->initialise(); + ETL_ASSERT(lookup_.capacity() <= pool_.capacity(), ETL_ERROR(indirect_vector_buffer_missmatch)); this->resize(initial_size); } @@ -1520,7 +1516,7 @@ namespace etl indirect_vector(size_t initial_size, typename etl::iindirect_vector::parameter_t value, etl::ivector& lookup_, etl::ipool& pool_) : etl::iindirect_vector(lookup_, pool_) { - this->initialise(); + ETL_ASSERT(lookup_.capacity() <= pool_.capacity(), ETL_ERROR(indirect_vector_buffer_missmatch)); this->resize(initial_size, value); } @@ -1534,6 +1530,7 @@ namespace etl indirect_vector(TIterator first, TIterator last, etl::ivector& lookup_, etl::ipool& pool_) : etl::iindirect_vector(lookup_, pool_) { + ETL_ASSERT(lookup_.capacity() <= pool_.capacity(), ETL_ERROR(indirect_vector_buffer_missmatch)); this->assign(first, last); } @@ -1544,6 +1541,7 @@ namespace etl indirect_vector(std::initializer_list init, etl::ivector& lookup_, etl::ipool& pool_) : etl::iindirect_vector(lookup_, pool_) { + ETL_ASSERT(lookup_.capacity() <= pool_.capacity(), ETL_ERROR(indirect_vector_buffer_missmatch)); this->assign(init.begin(), init.end()); } #endif @@ -1554,6 +1552,7 @@ namespace etl indirect_vector(const indirect_vector& other, etl::ivector& lookup_, etl::ipool& pool_) : etl::iindirect_vector(lookup_, pool_) { + ETL_ASSERT(lookup_.capacity() <= pool_.capacity(), ETL_ERROR(indirect_vector_buffer_missmatch)); this->assign(other.begin(), other.end()); } @@ -1577,6 +1576,7 @@ namespace etl indirect_vector(indirect_vector&& other, etl::ivector& lookup_, etl::ipool& pool_) : etl::iindirect_vector(lookup_, pool_) { + ETL_ASSERT(lookup_.capacity() <= pool_.capacity(), ETL_ERROR(indirect_vector_buffer_missmatch)); this->move_container(std::move(other)); } diff --git a/include/etl/version.h b/include/etl/version.h index a30ba738..44eab696 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -38,7 +38,7 @@ SOFTWARE. ///\ingroup utilities #define ETL_VERSION_MAJOR 14 -#define ETL_VERSION_MINOR 36 +#define ETL_VERSION_MINOR 37 #define ETL_VERSION_PATCH 0 #define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) "." ETL_STRINGIFY(ETL_VERSION_MINOR) "." ETL_STRINGIFY(ETL_VERSION_PATCH) diff --git a/library.json b/library.json index 8a3aae1c..4ca979ae 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Embedded Template Library", - "version": "14.36.0", + "version": "14.37.0", "authors": { "name": "John Wellbelove", "email": "" diff --git a/library.properties b/library.properties index dba7ab60..2b14beb2 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Embedded Template Library -version=14.36.0 +version=14.37.0 author= John Wellbelove maintainer=John Wellbelove license=MIT diff --git a/support/Release notes.txt b/support/Release notes.txt index fdf1276c..c31e9581 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,7 @@ +=============================================================================== +14.37.0 +Added etl::indirect_vector + =============================================================================== 14.36.0 Added wchar_t, u16 and u32 version of the 'set from string' function. diff --git a/test/test_indirect_vector.cpp b/test/test_indirect_vector.cpp index 691d8873..c246712a 100644 --- a/test/test_indirect_vector.cpp +++ b/test/test_indirect_vector.cpp @@ -227,7 +227,6 @@ namespace //************************************************************************* TEST(test_move_constructor) { - const size_t SIZE = 10U; typedef etl::indirect_vector, SIZE> Data; std::unique_ptr p1(new uint32_t(1U)); @@ -275,7 +274,6 @@ namespace //************************************************************************* TEST(test_move_assignment) { - const size_t SIZE = 10U; typedef etl::indirect_vector, SIZE> Data; std::unique_ptr p1(new uint32_t(1U)); @@ -327,7 +325,6 @@ namespace //************************************************************************* TEST(test_move_assignment_interface) { - const size_t SIZE = 10U; typedef etl::indirect_vector, SIZE> Data; typedef etl::iindirect_vector> IData; diff --git a/test/vs2017/etl.vcxproj b/test/vs2017/etl.vcxproj index 71eeb118..24111577 100644 --- a/test/vs2017/etl.vcxproj +++ b/test/vs2017/etl.vcxproj @@ -223,6 +223,7 @@ false stdcpp17 false + ProgramDatabase Console