diff --git a/include/etl/callback_timer.h b/include/etl/callback_timer.h index 487f5789..07c084e6 100644 --- a/include/etl/callback_timer.h +++ b/include/etl/callback_timer.h @@ -93,6 +93,7 @@ namespace etl IFUNCTION, DELEGATE }; + //******************************************* callback_timer_data() : p_callback(nullptr), @@ -146,10 +147,10 @@ namespace etl //******************************************* /// ETL delegate callback //******************************************* - callback_timer_data(etl::timer::id::type id_, + callback_timer_data(etl::timer::id::type id_, etl::delegate& callback_, - uint32_t period_, - bool repeating_) + uint32_t period_, + bool repeating_) : p_callback(reinterpret_cast(&callback_)), period(period_), delta(etl::timer::state::INACTIVE), @@ -538,7 +539,7 @@ namespace etl for (int i = 0; i < MAX_TIMERS; ++i) { - new (&timer_array[i]) callback_timer_data(); + ::new (&timer_array[i]) callback_timer_data(); } registered_timers = 0; @@ -591,14 +592,10 @@ namespace etl #if ETL_CPP11_SUPPORTED else if(timer.cbk_type == callback_timer_data::DELEGATE) { - // Call the function wrapper callback. + // Call the delegate callback. (*reinterpret_cast*>(timer.p_callback))(); } #endif - else - { - ETL_ALWAYS_ASSERT("Callback timer has incorrect callback type stored"); - } } has_active = !active_list.empty(); diff --git a/include/etl/cstring.h b/include/etl/cstring.h index 8036485c..a812403e 100644 --- a/include/etl/cstring.h +++ b/include/etl/cstring.h @@ -203,6 +203,20 @@ namespace etl return new_string; } + //************************************************************************* + /// Assignment operator. + //************************************************************************* + string& operator = (const string& rhs) + { + if (&rhs != this) + { + this->assign(rhs); + } + + return *this; + } + + //************************************************************************* /// Assignment operator. //************************************************************************* diff --git a/include/etl/memory.h b/include/etl/memory.h index 8d9c1aa1..39705ca1 100644 --- a/include/etl/memory.h +++ b/include/etl/memory.h @@ -308,6 +308,8 @@ namespace etl template TOutputIterator uninitialized_copy(TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin, TCounter& count) { + count += int32_t(etl::distance(i_begin, i_end)); + return std::uninitialized_copy(i_begin, i_end, o_begin); } #endif diff --git a/include/etl/version.h b/include/etl/version.h index 0c4b18b3..9d687c0c 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -40,7 +40,6 @@ SOFTWARE. #define ETL_VERSION_MAJOR 16 #define ETL_VERSION_MINOR 4 #define ETL_VERSION_PATCH 0 - #define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) "." ETL_STRINGIFY(ETL_VERSION_MINOR) "." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_W ETL_STRINGIFY(ETL_VERSION_MAJOR) L"." ETL_STRINGIFY(ETL_VERSION_MINOR) L"." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_U16 ETL_STRINGIFY(ETL_VERSION_MAJOR) u"." ETL_STRINGIFY(ETL_VERSION_MINOR) u"." ETL_STRINGIFY(ETL_VERSION_PATCH)