Fixed etl::fsm C++03 template definition that was corrupted in 20.10.0

Fixed meson.build
This commit is contained in:
John Wellbelove 2021-08-12 10:50:24 +01:00
parent 9f2f769f1a
commit 21e114c252
7 changed files with 37 additions and 37 deletions

View File

@ -72,9 +72,9 @@ namespace etl
/// Allow alternative type for state id.
#if !defined(ETL_FSM_STATE_ID_TYPE)
typedef uint_least8_t fsm_state_id_t;
typedef uint_least8_t fsm_state_id_t;
#else
typedef ETL_FSM_STATE_ID_TYPE fsm_state_id_t;
typedef ETL_FSM_STATE_ID_TYPE fsm_state_id_t;
#endif
// For internal FSM use.
@ -215,7 +215,7 @@ namespace etl
if (p_default_child == ETL_NULLPTR)
{
p_active_child = &state;
p_active_child = &state;
p_default_child = &state;
}
}
@ -227,7 +227,7 @@ namespace etl
template <typename TSize>
void set_child_states(etl::ifsm_state** state_list, TSize size)
{
p_active_child = ETL_NULLPTR;
p_active_child = ETL_NULLPTR;
p_default_child = ETL_NULLPTR;
for (TSize i = 0; i < size; ++i)
@ -244,10 +244,10 @@ namespace etl
//*******************************************
ifsm_state(etl::fsm_state_id_t state_id_)
: state_id(state_id_),
p_context(ETL_NULLPTR),
p_parent(ETL_NULLPTR),
p_active_child(ETL_NULLPTR),
p_default_child(ETL_NULLPTR)
p_context(ETL_NULLPTR),
p_parent(ETL_NULLPTR),
p_active_child(ETL_NULLPTR),
p_default_child(ETL_NULLPTR)
{
}
@ -355,7 +355,7 @@ namespace etl
if (call_on_enter_state)
{
etl::fsm_state_id_t next_state_id;
etl::ifsm_state* p_last_state;
etl::ifsm_state* p_last_state;
do
{
@ -483,11 +483,11 @@ namespace etl
bool have_changed_state(etl::fsm_state_id_t next_state_id) const
{
return (next_state_id != p_state->get_state_id()) &&
(next_state_id != ifsm_state::No_State_Change);
(next_state_id != ifsm_state::No_State_Change);
}
etl::ifsm_state* p_state; ///< A pointer to the current state.
etl::ifsm_state** state_list; ///< The list of added states.
etl::ifsm_state* p_state; ///< A pointer to the current state.
etl::ifsm_state** state_list; ///< The list of added states.
etl::fsm_state_id_t number_of_states; ///< The number of states.
};
@ -570,10 +570,10 @@ namespace etl
// The definition for all 16 message types.
//***************************************************************************
template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_,
typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8,
typename T9, typename T10, typename T11, typename T12,
typename T13, typename T14, typename T15, typename T16>
typename T1 = void, typename T2 = void, typename T3 = void, typename T4 = void,
typename T5 = void, typename T6 = void, typename T7 = void, typename T8 = void,
typename T9 = void, typename T10 = void, typename T11 = void, typename T12 = void,
typename T13 = void, typename T14 = void, typename T15 = void, typename T16 = void>
class fsm_state : public ifsm_state
{
public:

View File

@ -84,9 +84,9 @@ namespace etl
/// Allow alternative type for state id.
#if !defined(ETL_FSM_STATE_ID_TYPE)
typedef uint_least8_t fsm_state_id_t;
typedef uint_least8_t fsm_state_id_t;
#else
typedef ETL_FSM_STATE_ID_TYPE fsm_state_id_t;
typedef ETL_FSM_STATE_ID_TYPE fsm_state_id_t;
#endif
// For internal FSM use.
@ -241,7 +241,7 @@ namespace etl
if (p_default_child == ETL_NULLPTR)
{
p_active_child = &state;
p_active_child = &state;
p_default_child = &state;
}
}
@ -253,7 +253,7 @@ namespace etl
template <typename TSize>
void set_child_states(etl::ifsm_state** state_list, TSize size)
{
p_active_child = ETL_NULLPTR;
p_active_child = ETL_NULLPTR;
p_default_child = ETL_NULLPTR;
for (TSize i = 0; i < size; ++i)
@ -270,10 +270,10 @@ namespace etl
//*******************************************
ifsm_state(etl::fsm_state_id_t state_id_)
: state_id(state_id_),
p_context(ETL_NULLPTR),
p_parent(ETL_NULLPTR),
p_active_child(ETL_NULLPTR),
p_default_child(ETL_NULLPTR)
p_context(ETL_NULLPTR),
p_parent(ETL_NULLPTR),
p_active_child(ETL_NULLPTR),
p_default_child(ETL_NULLPTR)
{
}
@ -381,7 +381,7 @@ namespace etl
if (call_on_enter_state)
{
etl::fsm_state_id_t next_state_id;
etl::ifsm_state* p_last_state;
etl::ifsm_state* p_last_state;
do
{
@ -509,11 +509,11 @@ namespace etl
bool have_changed_state(etl::fsm_state_id_t next_state_id) const
{
return (next_state_id != p_state->get_state_id()) &&
(next_state_id != ifsm_state::No_State_Change);
(next_state_id != ifsm_state::No_State_Change);
}
etl::ifsm_state* p_state; ///< A pointer to the current state.
etl::ifsm_state** state_list; ///< The list of added states.
etl::ifsm_state* p_state; ///< A pointer to the current state.
etl::ifsm_state** state_list; ///< The list of added states.
etl::fsm_state_id_t number_of_states; ///< The number of states.
};
@ -603,11 +603,11 @@ namespace etl
cog.outl("template <typename TContext, typename TDerived, const etl::fsm_state_id_t STATE_ID_, ")
cog.out(" ")
for n in range(1, int(Handlers)):
cog.out("typename T%s, " % n)
cog.out("typename T%s = void, " % n)
if n % 4 == 0:
cog.outl("")
cog.out(" ")
cog.outl("typename T%s>" % Handlers)
cog.outl("typename T%s = void>" % Handlers)
cog.outl("class fsm_state : public ifsm_state")
cog.outl("{")
cog.outl("public:")

View File

@ -38,8 +38,8 @@ SOFTWARE.
///\ingroup utilities
#define ETL_VERSION_MAJOR 20
#define ETL_VERSION_MINOR 16
#define ETL_VERSION_PATCH 0
#define ETL_VERSION_MINOR 15
#define ETL_VERSION_PATCH 1
#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)

View File

@ -1,6 +1,6 @@
{
"name": "ETL Embedded Template Library",
"version": "20.16.0",
"version": "20.15.1",
"author s": {
"name": "John Wellbelove",
"email": "john.wellbelove@etlcpp.com"

View File

@ -1,5 +1,5 @@
name=Embedded Template Library ETL
version=20.16.0
version=20.15.1
author= John Wellbelove <john.wellbelove@etlcpp.com>
maintainer=John Wellbelove <john.wellbelove@etlcpp.com>
license=MIT

View File

@ -8,7 +8,7 @@ project('PROJECT_NAME',
'cpp_std=c++17', 'build.cpp_std=c++17',
],
meson_version: '>=0.54.0',
version: '20.15.0'
version: '20.15.1'
)
######################

View File

@ -1,6 +1,6 @@
===============================================================================
20.16.0
Added C++17 variadic versions of etl::message_router ans etl::fsm
20.15.1
Fixed etl::fsm C++03 template definition that was corrupted in 20.10.0
Fixed meson.build
===============================================================================