mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-29 22:08:45 +08:00
Fix C++ standard syntax compatibility for repair()
This commit is contained in:
parent
1825c54570
commit
db878c54c5
@ -1208,11 +1208,9 @@ namespace etl
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
#ifdef ETL_ICIRCULAR_BUFFER_REPAIR_ENABLE
|
||||
virtual
|
||||
#endif
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#ifdef ETL_ICIRCULAR_BUFFER_REPAIR_ENABLE
|
||||
ETL_OVERRIDE
|
||||
#endif
|
||||
{
|
||||
ETL_ASSERT(etl::is_trivially_copyable<T>::value, ETL_ERROR(etl::circular_buffer_incompatible_type));
|
||||
@ -1395,11 +1393,9 @@ namespace etl
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
#ifdef ETL_ICIRCULAR_BUFFER_REPAIR_ENABLE
|
||||
virtual
|
||||
#endif
|
||||
void repair()
|
||||
#ifdef ETL_ICIRCULAR_BUFFER_REPAIR_ENABLE
|
||||
ETL_OVERRIDE
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
@ -2483,11 +2483,9 @@ namespace etl
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
#ifdef ETL_IDEQUE_REPAIR_ENABLE
|
||||
virtual
|
||||
#endif
|
||||
void repair()
|
||||
#ifdef ETL_IDEQUE_REPAIR_ENABLE
|
||||
ETL_OVERRIDE
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
|
||||
|
||||
@ -202,6 +202,14 @@ SOFTWARE.
|
||||
#define ETL_HAS_IDEQUE_REPAIR 0
|
||||
#endif
|
||||
|
||||
//*************************************
|
||||
// Option to enable repair-after-memcpy for icircular_buffer.
|
||||
#if defined(ETL_ICIRCULAR_BUFFER_REPAIR_ENABLE)
|
||||
#define ETL_HAS_ICIRCULAR_BUFFER_REPAIR 1
|
||||
#else
|
||||
#define ETL_HAS_ICIRCULAR_BUFFER_REPAIR 0
|
||||
#endif
|
||||
|
||||
//*************************************
|
||||
// Indicate if C++ exceptions are enabled.
|
||||
#if defined(ETL_THROW_EXCEPTIONS)
|
||||
@ -477,6 +485,7 @@ namespace etl
|
||||
static ETL_CONSTANT bool has_string_clear_after_use = (ETL_HAS_STRING_CLEAR_AFTER_USE == 1);
|
||||
static ETL_CONSTANT bool has_istring_repair = (ETL_HAS_ISTRING_REPAIR == 1);
|
||||
static ETL_CONSTANT bool has_ivector_repair = (ETL_HAS_IVECTOR_REPAIR == 1);
|
||||
static ETL_CONSTANT bool has_icircular_buffer_repair = (ETL_HAS_ICIRCULAR_BUFFER_REPAIR == 1);
|
||||
static ETL_CONSTANT bool has_mutable_array_view = (ETL_HAS_MUTABLE_ARRAY_VIEW == 1);
|
||||
static ETL_CONSTANT bool has_ideque_repair = (ETL_HAS_IDEQUE_REPAIR == 1);
|
||||
static ETL_CONSTANT bool has_virtual_messages = (ETL_HAS_VIRTUAL_MESSAGES == 1);
|
||||
|
||||
@ -246,9 +246,10 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
#if ETL_HAS_ISTRING_REPAIR
|
||||
ETL_OVERRIDE
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
etl::istring::repair_buffer(buffer);
|
||||
@ -434,9 +435,10 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
#if ETL_HAS_ISTRING_REPAIR
|
||||
ETL_OVERRIDE
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
@ -230,9 +230,10 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
#if ETL_HAS_ISTRING_REPAIR
|
||||
ETL_OVERRIDE
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
etl::iu16string::repair_buffer(buffer);
|
||||
@ -414,9 +415,10 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
#if ETL_HAS_ISTRING_REPAIR
|
||||
ETL_OVERRIDE
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
@ -230,9 +230,10 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
#if ETL_HAS_ISTRING_REPAIR
|
||||
ETL_OVERRIDE
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
etl::iu32string::repair_buffer(buffer);
|
||||
@ -414,9 +415,10 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
#if ETL_HAS_ISTRING_REPAIR
|
||||
ETL_OVERRIDE
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
@ -247,9 +247,10 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
#if ETL_HAS_ISTRING_REPAIR
|
||||
ETL_OVERRIDE
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
etl::iu8string::repair_buffer(buffer);
|
||||
@ -435,9 +436,10 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
#if ETL_HAS_ISTRING_REPAIR
|
||||
ETL_OVERRIDE
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
@ -1346,11 +1346,9 @@ namespace etl
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
#ifdef ETL_IVECTOR_REPAIR_ENABLE
|
||||
virtual
|
||||
#endif
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#ifdef ETL_IVECTOR_REPAIR_ENABLE
|
||||
ETL_OVERRIDE
|
||||
#endif
|
||||
{
|
||||
ETL_ASSERT_OR_RETURN(etl::is_trivially_copyable<T>::value, ETL_ERROR(etl::vector_incompatible_type));
|
||||
@ -1527,9 +1525,10 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
#ifdef ETL_IVECTOR_REPAIR_ENABLE
|
||||
ETL_OVERRIDE
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
}
|
||||
@ -1649,9 +1648,10 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
#ifdef ETL_IVECTOR_REPAIR_ENABLE
|
||||
ETL_OVERRIDE
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
etl::ivector<T*>::repair_buffer(buffer);
|
||||
@ -1806,9 +1806,10 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
#ifdef ETL_IVECTOR_REPAIR_ENABLE
|
||||
ETL_OVERRIDE
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
etl::ivector<T*>::repair_buffer(this->p_buffer);
|
||||
|
||||
@ -231,9 +231,10 @@ namespace etl
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
#if ETL_HAS_ISTRING_REPAIR
|
||||
virtual
|
||||
#endif
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
etl::iwstring::repair_buffer(buffer);
|
||||
}
|
||||
@ -414,9 +415,10 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
#if ETL_HAS_ISTRING_REPAIR
|
||||
ETL_OVERRIDE
|
||||
virtual void repair() ETL_OVERRIDE
|
||||
#else
|
||||
void repair()
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user