Modified debug #defines

This commit is contained in:
John Wellbelove 2016-12-28 12:52:50 +00:00
parent 4b9e9cd651
commit 0906d29278
6 changed files with 10 additions and 10 deletions

View File

@ -271,7 +271,7 @@ namespace etl
template <typename TIterator>
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

View File

@ -222,7 +222,7 @@ namespace etl
template <typename TIterator>
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

View File

@ -198,7 +198,7 @@ namespace etl
template <typename TIterator>
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

View File

@ -198,7 +198,7 @@ namespace etl
template <typename TIterator>
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

View File

@ -354,7 +354,7 @@ namespace etl
template <typename TIterator>
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 <typename TIterator>
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)
{

View File

@ -452,7 +452,7 @@ namespace etl
template <typename TIterator>
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)
{