From 32ca2d87d20ac0fa73d9273ad47fb9f44877afd9 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sun, 18 Apr 2021 08:45:09 +0100 Subject: [PATCH] Replaced std::distance with etl::distance in erase() and erase_if() for vector.h --- include/etl/vector.h | 4 ++-- include/etl/version.h | 2 +- library.json | 2 +- library.properties | 2 +- support/Release notes.txt | 4 ++++ 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/etl/vector.h b/include/etl/vector.h index b8afbfd0..b1ee244c 100644 --- a/include/etl/vector.h +++ b/include/etl/vector.h @@ -1747,7 +1747,7 @@ namespace etl erase(etl::ivector& v, const U& value) { typename etl::ivector::iterator itr = etl::remove(v.begin(), v.end(), value); - typename etl::ivector::difference_type d = std::distance(itr, v.end()); + typename etl::ivector::difference_type d = etl::distance(itr, v.end()); v.erase(itr, v.end()); return d; @@ -1761,7 +1761,7 @@ namespace etl erase_if(etl::ivector& v, TPredicate predicate) { typename etl::ivector::iterator itr = etl::remove_if(v.begin(), v.end(), predicate); - typename etl::ivector::difference_type d = std::distance(itr, v.end()); + typename etl::ivector::difference_type d = etl::distance(itr, v.end()); v.erase(itr, v.end()); return d; diff --git a/include/etl/version.h b/include/etl/version.h index f7df6213..848cbb24 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -39,7 +39,7 @@ SOFTWARE. #define ETL_VERSION_MAJOR 20 #define ETL_VERSION_MINOR 9 -#define ETL_VERSION_PATCH 0 +#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) diff --git a/library.json b/library.json index 92b2bc19..7a61938c 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "ETL Embedded Template Library", - "version": "20.9.0", + "version": "20.9.1", "author s": { "name": "John Wellbelove", "email": "john.wellbelove@etlcpp.com" diff --git a/library.properties b/library.properties index 1a6e3956..ce543c10 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Embedded Template Library ETL -version=20.9.0 +version=20.9.1 author= John Wellbelove maintainer=John Wellbelove license=MIT diff --git a/support/Release notes.txt b/support/Release notes.txt index 564281ae..d5d5adbe 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,7 @@ +=============================================================================== +20.9.1 +Replaced std::distance with etl::distance in erase() and erase_if() for vector.h + =============================================================================== 20.9.0 Fixed #362 'etl::fsm::receive() partial override'.