#948 Bug in queue pop can break queue.empty()

This commit is contained in:
John Wellbelove 2024-08-31 09:40:46 +01:00
parent d564bb501a
commit 3612390888
7 changed files with 12 additions and 6 deletions

View File

@ -454,7 +454,7 @@ namespace etl
void pop()
{
#if defined(ETL_CHECK_PUSH_POP)
ETL_ASSERT(!empty(), ETL_ERROR(queue_empty));
ETL_ASSERT_OR_RETURN(!empty(), ETL_ERROR(queue_empty));
#endif
p_buffer[out].~T();
del_out();

View File

@ -401,7 +401,7 @@ namespace etl
void pop()
{
#if defined(ETL_CHECK_PUSH_POP)
ETL_ASSERT(!empty(), ETL_ERROR(stack_empty));
ETL_ASSERT_OR_RETURN(!empty(), ETL_ERROR(stack_empty));
#endif
p_buffer[top_index].~T();
base_t::del_out();

View File

@ -40,7 +40,7 @@ SOFTWARE.
#define ETL_VERSION_MAJOR 20
#define ETL_VERSION_MINOR 39
#define ETL_VERSION_PATCH 3
#define ETL_VERSION_PATCH 4
#define ETL_VERSION ETL_STRING(ETL_VERSION_MAJOR) "." ETL_STRING(ETL_VERSION_MINOR) "." ETL_STRING(ETL_VERSION_PATCH)
#define ETL_VERSION_W ETL_WIDE_STRING(ETL_VERSION_MAJOR) L"." ETL_WIDE_STRING(ETL_VERSION_MINOR) L"." ETL_WIDE_STRING(ETL_VERSION_PATCH)

View File

@ -1,6 +1,6 @@
{
"name": "Embedded Template Library",
"version": "20.39.3",
"version": "20.39.4",
"authors": {
"name": "John Wellbelove",
"email": "john.wellbelove@etlcpp.com"

View File

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

View File

@ -1,4 +1,10 @@
===============================================================================
20.39.4
#948 Bug in queue pop can break queue.empty()
Also included etl::stack in the fix.
===============================================================================
20.39.3
Updates:

View File

@ -1 +1 @@
20.39.3
20.39.4