From b3f7563ebb7a54eca3ba12d2dc56a253d00fb999 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Mon, 17 Dec 2018 19:09:32 +0000 Subject: [PATCH 1/2] Merge remote-tracking branch 'origin/master' into feature/rvalue-references # Conflicts: # include/etl/private/pvoidvector.h --- CMakeLists.txt | 19 +++---------------- include/etl/private/pvoidvector.h | 5 ----- include/etl/state_chart.h | 2 +- 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6cfbcd7c..901d260e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,23 +15,10 @@ set(ETL_PROFILE "DEFAULT" CACHE STRING "Defines what profile header to include. option(BUILD_TESTS "Build unit tests" OFF) +add_library(etl INTERFACE) -# Note: this will not compile src/c/ecl_timer.c as that c file has a dependence -# on ecl_user.h which is provided by clients of this library -add_library(etl STATIC - src/binary.cpp - src/crc16.cpp - src/crc16_ccitt.cpp - src/crc16_kermit.cpp - src/crc32.cpp - src/crc64_ecma.cpp - src/crc8_ccitt.cpp - src/error_handler.cpp - src/pearson.cpp - src/random.cpp - ) target_include_directories(etl - PUBLIC + INTERFACE include include/etl/profiles ) @@ -60,7 +47,7 @@ endif() message(STATUS "Compiling with ETL profile set to: ${ETL_PROFILE}") target_compile_definitions(etl - PUBLIC + INTERFACE ${ETL_PROFILE} ) diff --git a/include/etl/private/pvoidvector.h b/include/etl/private/pvoidvector.h index 3b735331..474e2d19 100644 --- a/include/etl/private/pvoidvector.h +++ b/include/etl/private/pvoidvector.h @@ -45,7 +45,6 @@ SOFTWARE. #include "../stl/iterator.h" #ifdef ETL_COMPILER_GCC -#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-variable" #endif @@ -647,10 +646,6 @@ namespace etl #include "minmax_pop.h" -#ifdef ETL_COMPILER_GCC -#pragma GCC diagnostic pop -#endif - #undef ETL_IN_PVOIDVECTOR #endif diff --git a/include/etl/state_chart.h b/include/etl/state_chart.h index b99674cf..4602a882 100644 --- a/include/etl/state_chart.h +++ b/include/etl/state_chart.h @@ -242,7 +242,7 @@ namespace etl } //************************************************************************* - /// + /// //************************************************************************* void start(const bool on_entry_initial = true) { From 696c61f198d5422190f722905f243141feefea24 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Mon, 17 Dec 2018 19:09:56 +0000 Subject: [PATCH 2/2] etl::deque push fix --- include/etl/deque.h | 12 +++++------- include/etl/version.h | 2 +- support/Release notes.txt | 4 ++++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/etl/deque.h b/include/etl/deque.h index fa9d657a..b829da5d 100644 --- a/include/etl/deque.h +++ b/include/etl/deque.h @@ -238,8 +238,6 @@ namespace etl protected: - typedef typename etl::parameter_type::type parameter_t; - //************************************************************************* /// Test for an iterator. //************************************************************************* @@ -1624,7 +1622,7 @@ namespace etl /// If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full. ///\param item The item to push to the deque. //************************************************************************* - void push_back(parameter_t item) + void push_back(const T& item) { #if defined(ETL_CHECK_PUSH_POP) ETL_ASSERT(!full(), ETL_ERROR(deque_full)); @@ -1752,7 +1750,7 @@ namespace etl /// If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full. ///\param item The item to push to the deque. //************************************************************************* - void push_front(parameter_t item) + void push_front(const T& item) { #if defined(ETL_CHECK_PUSH_POP) ETL_ASSERT(!full(), ETL_ERROR(deque_full)); @@ -2065,7 +2063,7 @@ namespace etl //********************************************************************* /// Create a new element with a default value at the front. //********************************************************************* - void create_element_front(parameter_t value) + void create_element_front(const T& value) { --_begin; ::new (&(*_begin)) T(value); @@ -2076,7 +2074,7 @@ namespace etl //********************************************************************* /// Create a new element with a value at the back //********************************************************************* - void create_element_back(parameter_t value) + void create_element_back(const T& value) { ::new (&(*_end)) T(value); ++_end; @@ -2274,7 +2272,7 @@ namespace etl //************************************************************************* /// Assigns data to the deque. //************************************************************************* - explicit deque(size_t n, typename etl::ideque::parameter_t value = value_type()) + explicit deque(size_t n, const T& value = value_type()) : etl::ideque(reinterpret_cast(&buffer[0]), MAX_SIZE, BUFFER_SIZE) { this->assign(n, value); diff --git a/include/etl/version.h b/include/etl/version.h index 8cf86d59..cb340a46 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -39,7 +39,7 @@ SOFTWARE. #define ETL_VERSION_MAJOR 14 #define ETL_VERSION_MINOR 5 -#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_WIDE_STRING(ETL_CONCAT(ETL_CONCAT(ETL_VERSION_MAJOR, ETL_VERSION_MINOR), ETL_VERSION_PATCH)) diff --git a/support/Release notes.txt b/support/Release notes.txt index 263b614f..e2fa249f 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,7 @@ +=============================================================================== +14.5.1 +Fixed deque pushes for literals. + =============================================================================== 14.5.0 Added move algorithms and utility to 'alternate' STL.