Skip to content

Commit 0d0e290

Browse files
author
John Wellbelove
committed
Changed #if ETL_USING_STL to #if ETL_USING_STD_OSTREAM around std::basic_ostream
Fixed warnings when using ETL_DEBUG_COUNT in non debug build
1 parent 2fa82d5 commit 0d0e290

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

include/etl/basic_string.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3173,7 +3173,7 @@ namespace etl
31733173
///\return Reference to the output stream, for chaining write operations.
31743174
///\ingroup string
31753175
//***************************************************************************
3176-
#if ETL_USING_STL
3176+
#if ETL_USING_STD_OSTREAM
31773177
template <typename T>
31783178
std::basic_ostream<T, std::char_traits<T> > &operator<<(std::basic_ostream<T, std::char_traits<T> > &os,
31793179
const etl::ibasic_string<T>& str)

include/etl/debug_count.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,16 @@ inline void swap(etl::debug_count& lhs, etl::debug_count& rhs)
158158
}
159159

160160
#else
161-
#define ETL_DECLARE_DEBUG_COUNT
162-
#define ETL_SET_DEBUG_COUNT(n)
163-
#define ETL_GET_DEBUG_COUNT
164-
#define ETL_INCREMENT_DEBUG_COUNT
165-
#define ETL_DECREMENT_DEBUG_COUNT
166-
#define ETL_ADD_DEBUG_COUNT(n)
167-
#define ETL_SUBTRACT_DEBUG_COUNT(n)
168-
#define ETL_RESET_DEBUG_COUNT
169-
#define ETL_OBJECT_RESET_DEBUG_COUNT(object)
170-
#define ETL_OBJECT_GET_DEBUG_COUNT(object)
161+
#define ETL_DECLARE_DEBUG_COUNT enum { etl_debug_count_suppressed__ = 0 }
162+
#define ETL_SET_DEBUG_COUNT(n) ((void)0)
163+
#define ETL_GET_DEBUG_COUNT 0
164+
#define ETL_INCREMENT_DEBUG_COUNT ((void)0)
165+
#define ETL_DECREMENT_DEBUG_COUNT ((void)0)
166+
#define ETL_ADD_DEBUG_COUNT(n) ((void)0)
167+
#define ETL_SUBTRACT_DEBUG_COUNT(n) ((void)0)
168+
#define ETL_RESET_DEBUG_COUNT ((void)0)
169+
#define ETL_OBJECT_RESET_DEBUG_COUNT(object) ((void)0)
170+
#define ETL_OBJECT_GET_DEBUG_COUNT(object) 0
171171
#endif // ETL_DEBUG_COUNT
172172

173173
#endif

include/etl/forward_list.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ namespace etl
352352
etl::ipool* p_node_pool; ///< The pool of data nodes used in the list.
353353
size_type MAX_SIZE; ///< The maximum size of the forward_list.
354354
bool pool_is_shared; ///< If <b>true</b> then the pool is shared between lists.
355-
ETL_DECLARE_DEBUG_COUNT; ///< Internal debugging.
355+
ETL_DECLARE_DEBUG_COUNT; ///< Internal debugging.
356356
};
357357

358358
//***************************************************************************
@@ -745,7 +745,7 @@ namespace etl
745745
data_node_t* p_data_node = allocate_data_node();
746746
::new (&(p_data_node->value)) T();
747747
ETL_INCREMENT_DEBUG_COUNT;
748-
insert_node_after(start_node, *p_data_node);
748+
insert_node_after(start_node, *p_data_node);
749749
return front();
750750
}
751751

include/etl/string_view.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ void swap(etl::basic_string_view<T, etl::char_traits<T> >& lhs, etl::basic_strin
982982
//*************************************************************************
983983
/// Operator overload to write to std basic_ostream
984984
//*************************************************************************
985-
#if ETL_USING_STL
985+
#if ETL_USING_STD_OSTREAM
986986
template <typename T>
987987
std::basic_ostream<T, std::char_traits<T> > &operator<<(std::basic_ostream<T, std::char_traits<T> > &os,
988988
etl::basic_string_view<T, etl::char_traits<T> > text)

0 commit comments

Comments
 (0)