diff --git a/src/iflat_map.h b/src/iflat_map.h index 399897f2..1e50ea1c 100644 --- a/src/iflat_map.h +++ b/src/iflat_map.h @@ -271,7 +271,7 @@ namespace etl template void assign(TIterator first, TIterator last) { -#ifdef _DEBUG +#if defined(_DEBUG) || defined(DEBUG) difference_type count = std::distance(first, last); ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(flat_map_full)); #endif diff --git a/src/iflat_multimap.h b/src/iflat_multimap.h index e5fa864e..ed4e75ed 100644 --- a/src/iflat_multimap.h +++ b/src/iflat_multimap.h @@ -222,7 +222,7 @@ namespace etl template void assign(TIterator first, TIterator last) { -#ifdef _DEBUG +#if defined(_DEBUG) || defined(DEBUG) difference_type count = std::distance(first, last); ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(flat_multimap_full)); #endif diff --git a/src/iflat_multiset.h b/src/iflat_multiset.h index 135511c0..e06995a4 100644 --- a/src/iflat_multiset.h +++ b/src/iflat_multiset.h @@ -198,7 +198,7 @@ namespace etl template void assign(TIterator first, TIterator last) { -#ifdef _DEBUG +#if defined(_DEBUG) || defined(DEBUG) difference_type count = std::distance(first, last); ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(flat_multiset_full)); #endif diff --git a/src/iflat_set.h b/src/iflat_set.h index 55ca571a..be975c69 100644 --- a/src/iflat_set.h +++ b/src/iflat_set.h @@ -198,7 +198,7 @@ namespace etl template void assign(TIterator first, TIterator last) { -#ifdef _DEBUG +#if defined(_DEBUG) || defined(DEBUG) difference_type count = std::distance(first, last); ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(flat_set_full)); #endif diff --git a/src/iforward_list.h b/src/iforward_list.h index b663ad8e..e4a7dfb5 100644 --- a/src/iforward_list.h +++ b/src/iforward_list.h @@ -354,7 +354,7 @@ namespace etl template void assign(TIterator first, TIterator last) { -#ifdef _DEBUG +#if defined(_DEBUG) || defined(DEBUG) difference_type count = std::distance(first, last); ETL_ASSERT(count >= 0, ETL_ERROR(forward_list_iterator)); #endif @@ -512,7 +512,7 @@ namespace etl template void insert_after(iterator position, TIterator first, TIterator last) { -#ifdef _DEBUG +#if defined(_DEBUG) || defined(DEBUG) difference_type count = std::distance(first, last); ETL_ASSERT((count + current_size) <= MAX_SIZE, ETL_ERROR(forward_list_full)); #endif @@ -609,7 +609,7 @@ namespace etl return; // Can't more to before yourself! } -#ifdef _DEBUG +#if defined(_DEBUG) || defined(DEBUG) // Check that we are not doing an illegal move! for (const_iterator item = first_before; item != last; ++item) { diff --git a/src/ilist.h b/src/ilist.h index 50795bf2..514ffc7a 100644 --- a/src/ilist.h +++ b/src/ilist.h @@ -452,7 +452,7 @@ namespace etl template void assign(TIterator first, TIterator last) { -#ifdef _DEBUG +#if defined(_DEBUG) || defined(DEBUG) difference_type count = std::distance(first, last); ETL_ASSERT(count >= 0, ETL_ERROR(list_iterator)); ETL_ASSERT(size_t(count) <= MAX_SIZE, ETL_ERROR(list_full)); @@ -475,7 +475,7 @@ namespace etl //************************************************************************* void assign(size_t n, parameter_t value) { -#ifdef _DEBUG +#if defined(_DEBUG) || defined(DEBUG) ETL_ASSERT(n <= MAX_SIZE, ETL_ERROR(list_full)); #endif @@ -1062,7 +1062,7 @@ namespace etl return; // Can't more to before yourself! } -#ifdef _DEBUG +#if defined(_DEBUG) || defined(DEBUG) // Check that we are not doing an illegal move! for (const_iterator item = first; item != last; ++item) {