From fad6e4d800db9252badf438d0a9596e33c57d1b8 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Tue, 1 Dec 2020 13:19:44 +0000 Subject: [PATCH] Updated version numbers --- include/etl/delegate.h | 30 ++++++++++++++---------------- include/etl/version.h | 4 ++-- library.json | 2 +- library.properties | 2 +- support/Release notes.txt | 4 ++++ temp/fsm-patch.txt | 21 +++++++++++++++++++++ 6 files changed, 43 insertions(+), 20 deletions(-) create mode 100644 temp/fsm-patch.txt diff --git a/include/etl/delegate.h b/include/etl/delegate.h index 47716c54..2c407fd4 100644 --- a/include/etl/delegate.h +++ b/include/etl/delegate.h @@ -118,7 +118,7 @@ namespace etl /// Create from function (Compile time). //************************************************************************* template - ETL_CONSTEXPR14 static delegate create() + constexpr static delegate create() { return delegate(ETL_NULLPTR, function_stub); } @@ -127,7 +127,7 @@ namespace etl /// Create from Lambda or Functor. //************************************************************************* template ::value, void>::type> - ETL_CONSTEXPR14 static delegate create(const TLambda& instance) + constexpr static delegate create(const TLambda& instance) { return delegate((void*)(&instance), lambda_stub); } @@ -136,7 +136,7 @@ namespace etl /// Create from instance method (Run time). //************************************************************************* template - ETL_CONSTEXPR14 static delegate create(T& instance) + constexpr static delegate create(T& instance) { return delegate((void*)(&instance), method_stub); } @@ -152,7 +152,7 @@ namespace etl /// Create from const instance method (Run time). //************************************************************************* template - ETL_CONSTEXPR14 static delegate create(const T& instance) + constexpr static delegate create(const T& instance) { return delegate((void*)(&instance), const_method_stub); } @@ -161,13 +161,13 @@ namespace etl /// Disable create from rvalue instance method (Run time). //************************************************************************* template - ETL_CONSTEXPR14 static delegate create(T&& instance) = delete; + constexpr static delegate create(T&& instance) = delete; //************************************************************************* /// Create from instance method (Compile time). //************************************************************************* template - ETL_CONSTEXPR14 static delegate create() + constexpr static delegate create() { return delegate(method_instance_stub); } @@ -176,7 +176,7 @@ namespace etl /// Create from const instance method (Compile time). //************************************************************************* template - ETL_CONSTEXPR14 static delegate create() + constexpr static delegate create() { return delegate(const_method_instance_stub); } @@ -187,7 +187,7 @@ namespace etl /// At the time of writing, GCC appears to have trouble with this. //************************************************************************* template - ETL_CONSTEXPR14 static delegate create() + constexpr static delegate create() { return delegate(operator_instance_stub); } @@ -262,7 +262,7 @@ namespace etl invocation_element() = default; //*********************************************************************** - invocation_element(void* object_, stub_type stub_) + constexpr invocation_element(void* object_, stub_type stub_) : object(object_) , stub(stub_) { @@ -288,25 +288,23 @@ namespace etl //************************************************************************* /// Constructs a delegate from an object and stub. //************************************************************************* - ETL_CONSTEXPR14 delegate(void* object, stub_type stub) + constexpr delegate(void* object, stub_type stub) + : invocation(object, stub) { - invocation.object = object; - invocation.stub = stub; } //************************************************************************* /// Constructs a delegate from a stub. //************************************************************************* - ETL_CONSTEXPR14 delegate(stub_type stub) + constexpr delegate(stub_type stub) + : invocation(ETL_NULLPTR, stub) { - invocation.object = ETL_NULLPTR; - invocation.stub = stub; } //************************************************************************* /// Assign from an object and stub. //************************************************************************* - ETL_CONSTEXPR14 void assign(void* object, stub_type stub) + void assign(void* object, stub_type stub) { invocation.object = object; invocation.stub = stub; diff --git a/include/etl/version.h b/include/etl/version.h index 4fc178e9..4727b06d 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -38,8 +38,8 @@ SOFTWARE. ///\ingroup utilities #define ETL_VERSION_MAJOR 19 -#define ETL_VERSION_MINOR 2 -#define ETL_VERSION_PATCH 1 +#define ETL_VERSION_MINOR 3 +#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) diff --git a/library.json b/library.json index 7e806eb3..1ced482d 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Embedded Template Library", - "version": "19.2.1", + "version": "19.3.0", "author s": { "name": "John Wellbelove", "email": "john.wellbelove@etlcpp.com" diff --git a/library.properties b/library.properties index 0fccaa3f..464df9c5 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Embedded Template Library -version=19.2.1 +version=19.3.0 author= John Wellbelove maintainer=John Wellbelove license=MIT diff --git a/support/Release notes.txt b/support/Release notes.txt index 251c4710..7ccd1d5c 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,7 @@ +=============================================================================== +19.3.0 +More constexpr, template aliases and inline variables. + =============================================================================== 19.2.1 Fixed version number retrieval from Github. diff --git a/temp/fsm-patch.txt b/temp/fsm-patch.txt new file mode 100644 index 00000000..0fbafd94 --- /dev/null +++ b/temp/fsm-patch.txt @@ -0,0 +1,21 @@ +From 18713df17b39ef01707a5891f1d26b39b74ca8a3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20Chodzikiewicz?= +Date: Mon, 30 Nov 2020 17:06:02 +0100 +Subject: [PATCH] Add assertion for fsm's state array order +--- + include/etl/fsm.h | 1 + + 1 file changed, 1 insertion(+) +diff --git a/include/etl/fsm.h b/include/etl/fsm.h +index 84bb34c..55a41f7 100644 +--- a/include/etl/fsm.h ++++ b/include/etl/fsm.h +@@ -230,6 +230,7 @@ namespace etl + for (etl::fsm_state_id_t i = 0; i < size; ++i) + { + ETL_ASSERT((state_list[i] != nullptr), ETL_ERROR(etl::fsm_null_state_exception)); ++ ETL_ASSERT((state_list[i]->state_id == i),"State list is in incorrect order"); + state_list[i]->set_fsm_context(*this); + } + } +-- +2.29.2 \ No newline at end of file