mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-16 17:06:05 +08:00
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
This commit is contained in:
parent
1b65c4ec91
commit
97cd7e90dc
@ -3173,7 +3173,7 @@ namespace etl
|
||||
///\return Reference to the output stream, for chaining write operations.
|
||||
///\ingroup string
|
||||
//***************************************************************************
|
||||
#if ETL_USING_STL
|
||||
#if ETL_USING_STD_OSTREAM
|
||||
template <typename T>
|
||||
std::basic_ostream<T, std::char_traits<T> > &operator<<(std::basic_ostream<T, std::char_traits<T> > &os,
|
||||
const etl::ibasic_string<T>& str)
|
||||
|
||||
@ -158,16 +158,16 @@ inline void swap(etl::debug_count& lhs, etl::debug_count& rhs)
|
||||
}
|
||||
|
||||
#else
|
||||
#define ETL_DECLARE_DEBUG_COUNT
|
||||
#define ETL_SET_DEBUG_COUNT(n)
|
||||
#define ETL_GET_DEBUG_COUNT
|
||||
#define ETL_INCREMENT_DEBUG_COUNT
|
||||
#define ETL_DECREMENT_DEBUG_COUNT
|
||||
#define ETL_ADD_DEBUG_COUNT(n)
|
||||
#define ETL_SUBTRACT_DEBUG_COUNT(n)
|
||||
#define ETL_RESET_DEBUG_COUNT
|
||||
#define ETL_OBJECT_RESET_DEBUG_COUNT(object)
|
||||
#define ETL_OBJECT_GET_DEBUG_COUNT(object)
|
||||
#define ETL_DECLARE_DEBUG_COUNT enum { etl_debug_count_suppressed__ = 0 }
|
||||
#define ETL_SET_DEBUG_COUNT(n) ((void)0)
|
||||
#define ETL_GET_DEBUG_COUNT 0
|
||||
#define ETL_INCREMENT_DEBUG_COUNT ((void)0)
|
||||
#define ETL_DECREMENT_DEBUG_COUNT ((void)0)
|
||||
#define ETL_ADD_DEBUG_COUNT(n) ((void)0)
|
||||
#define ETL_SUBTRACT_DEBUG_COUNT(n) ((void)0)
|
||||
#define ETL_RESET_DEBUG_COUNT ((void)0)
|
||||
#define ETL_OBJECT_RESET_DEBUG_COUNT(object) ((void)0)
|
||||
#define ETL_OBJECT_GET_DEBUG_COUNT(object) 0
|
||||
#endif // ETL_DEBUG_COUNT
|
||||
|
||||
#endif
|
||||
|
||||
@ -352,7 +352,7 @@ namespace etl
|
||||
etl::ipool* p_node_pool; ///< The pool of data nodes used in the list.
|
||||
size_type MAX_SIZE; ///< The maximum size of the forward_list.
|
||||
bool pool_is_shared; ///< If <b>true</b> then the pool is shared between lists.
|
||||
ETL_DECLARE_DEBUG_COUNT; ///< Internal debugging.
|
||||
ETL_DECLARE_DEBUG_COUNT; ///< Internal debugging.
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
@ -745,7 +745,7 @@ namespace etl
|
||||
data_node_t* p_data_node = allocate_data_node();
|
||||
::new (&(p_data_node->value)) T();
|
||||
ETL_INCREMENT_DEBUG_COUNT;
|
||||
insert_node_after(start_node, *p_data_node);
|
||||
insert_node_after(start_node, *p_data_node);
|
||||
return front();
|
||||
}
|
||||
|
||||
|
||||
@ -982,7 +982,7 @@ void swap(etl::basic_string_view<T, etl::char_traits<T> >& lhs, etl::basic_strin
|
||||
//*************************************************************************
|
||||
/// Operator overload to write to std basic_ostream
|
||||
//*************************************************************************
|
||||
#if ETL_USING_STL
|
||||
#if ETL_USING_STD_OSTREAM
|
||||
template <typename T>
|
||||
std::basic_ostream<T, std::char_traits<T> > &operator<<(std::basic_ostream<T, std::char_traits<T> > &os,
|
||||
etl::basic_string_view<T, etl::char_traits<T> > text)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user