From de3de548baf07d84e3367feefbcc35a0e251641b Mon Sep 17 00:00:00 2001 From: Austin Morton Date: Tue, 9 Jan 2018 12:58:10 -0500 Subject: [PATCH] replace usages of _DEBUG with ETL_DEBUG fixes some -Wundef errors when _DEBUG was not defined --- src/flat_map.h | 4 ++-- src/forward_list.h | 2 +- src/intrusive_forward_list.h | 4 ++-- src/intrusive_list.h | 4 ++-- src/list.h | 4 ++-- src/reference_flat_map.h | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/flat_map.h b/src/flat_map.h index 1a5b09c0..26132748 100644 --- a/src/flat_map.h +++ b/src/flat_map.h @@ -263,8 +263,8 @@ namespace etl //********************************************************************* /// Assigns values to the flat_map. - /// If ETL_THROW_EXCEPTIONS & _DEBUG are defined, emits flat_map_full if the flat_map does not have enough free space. - /// If ETL_THROW_EXCEPTIONS & _DEBUG are defined, emits flat_map_iterator if the iterators are reversed. + /// If ETL_THROW_EXCEPTIONS & ETL_DEBUG are defined, emits flat_map_full if the flat_map does not have enough free space. + /// If ETL_THROW_EXCEPTIONS & ETL_DEBUG are defined, emits flat_map_iterator if the iterators are reversed. ///\param first The iterator to the first element. ///\param last The iterator to the last element + 1. //********************************************************************* diff --git a/src/forward_list.h b/src/forward_list.h index 116846a2..921b40b3 100644 --- a/src/forward_list.h +++ b/src/forward_list.h @@ -568,7 +568,7 @@ namespace etl //************************************************************************* /// Assigns a range of values to the forward_list. /// If asserts or exceptions are enabled throws etl::forward_list_full if the forward_list does not have enough free space. - /// If ETL_THROW_EXCEPTIONS & _DEBUG are defined throws forward_list_iterator if the iterators are reversed. + /// If ETL_THROW_EXCEPTIONS & ETL_DEBUG are defined throws forward_list_iterator if the iterators are reversed. //************************************************************************* template void assign(TIterator first, TIterator last) diff --git a/src/intrusive_forward_list.h b/src/intrusive_forward_list.h index 578fdfac..c2d91d2b 100644 --- a/src/intrusive_forward_list.h +++ b/src/intrusive_forward_list.h @@ -147,7 +147,7 @@ namespace etl //************************************************************************* /// Assigns a range of values to the intrusive_forward_list. - /// If ETL_THROW_EXCEPTIONS & _DEBUG are defined throws forward_list_iterator if the iterators are reversed. + /// If ETL_THROW_EXCEPTIONS & ETL_DEBUG are defined throws forward_list_iterator if the iterators are reversed. //************************************************************************* template void assign(TIterator first, TIterator last) @@ -971,7 +971,7 @@ namespace etl { if (!other.empty()) { -#if _DEBUG +#if defined(ETL_DEBUG) ETL_ASSERT(etl::is_sorted(other.begin(), other.end(), compare), ETL_ERROR(intrusive_forward_list_unsorted)); ETL_ASSERT(etl::is_sorted(begin(), end(), compare), ETL_ERROR(intrusive_forward_list_unsorted)); #endif diff --git a/src/intrusive_list.h b/src/intrusive_list.h index f1da84e8..a3d3be91 100644 --- a/src/intrusive_list.h +++ b/src/intrusive_list.h @@ -126,7 +126,7 @@ namespace etl //************************************************************************* /// Assigns a range of values to the intrusive_list. - /// If ETL_THROW_EXCEPTIONS & _DEBUG are defined emits a + /// If ETL_THROW_EXCEPTIONS & ETL_DEBUG are defined emits a /// intrusive_list_iterator_exception if the iterators are reversed. //************************************************************************* template @@ -1020,7 +1020,7 @@ namespace etl { if (!other.empty()) { -#if _DEBUG +#if defined(ETL_DEBUG) ETL_ASSERT(etl::is_sorted(other.begin(), other.end(), compare), ETL_ERROR(intrusive_list_unsorted)); ETL_ASSERT(etl::is_sorted(begin(), end(), compare), ETL_ERROR(intrusive_list_unsorted)); #endif diff --git a/src/list.h b/src/list.h index b4c83130..4ba169a2 100644 --- a/src/list.h +++ b/src/list.h @@ -706,7 +706,7 @@ namespace etl //************************************************************************* /// Assigns a range of values to the list. /// If asserts or exceptions are enabled throws etl::list_full if the list does not have enough free space. - /// If ETL_THROW_EXCEPTIONS & _DEBUG are defined throws list_iterator if the iterators are reversed. + /// If ETL_THROW_EXCEPTIONS & ETL_DEBUG are defined throws list_iterator if the iterators are reversed. //************************************************************************* template void assign(TIterator first, TIterator last) @@ -1250,7 +1250,7 @@ namespace etl { if (!other.empty()) { -#if _DEBUG +#if defined(ETL_DEBUG) ETL_ASSERT(etl::is_sorted(other.begin(), other.end(), compare), ETL_ERROR(list_unsorted)); ETL_ASSERT(etl::is_sorted(begin(), end(), compare), ETL_ERROR(list_unsorted)); #endif diff --git a/src/reference_flat_map.h b/src/reference_flat_map.h index fd98fc3e..eda76782 100644 --- a/src/reference_flat_map.h +++ b/src/reference_flat_map.h @@ -514,8 +514,8 @@ namespace etl //********************************************************************* /// Assigns values to the reference_flat_map. - /// If ETL_THROW_EXCEPTIONS & _DEBUG are defined, emits flat_map_full if the reference_flat_map does not have enough free space. - /// If ETL_THROW_EXCEPTIONS & _DEBUG are defined, emits flat_map_iterator if the iterators are reversed. + /// If ETL_THROW_EXCEPTIONS & ETL_DEBUG are defined, emits flat_map_full if the reference_flat_map does not have enough free space. + /// If ETL_THROW_EXCEPTIONS & ETL_DEBUG are defined, emits flat_map_iterator if the iterators are reversed. ///\param first The iterator to the first element. ///\param last The iterator to the last element + 1. //*********************************************************************