mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-17 09:26:05 +08:00
Merge remote-tracking branch 'origin/master' into development
# Conflicts: # include/etl/utility.h # include/etl/version.h # library.json # library.properties # support/Release notes.txt
This commit is contained in:
commit
d89de9be28
@ -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<void()>& callback_,
|
||||
uint32_t period_,
|
||||
bool repeating_)
|
||||
uint32_t period_,
|
||||
bool repeating_)
|
||||
: p_callback(reinterpret_cast<void*>(&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<etl::delegate<void()>*>(timer.p_callback))();
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
ETL_ALWAYS_ASSERT("Callback timer has incorrect callback type stored");
|
||||
}
|
||||
}
|
||||
|
||||
has_active = !active_list.empty();
|
||||
|
||||
@ -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.
|
||||
//*************************************************************************
|
||||
|
||||
@ -308,6 +308,8 @@ namespace etl
|
||||
template <typename TInputIterator, typename TOutputIterator, typename TCounter>
|
||||
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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user