Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development'
Browse files Browse the repository at this point in the history
# Conflicts:
#	library.properties
#	support/Release notes.txt
#	test/codeblocks/ETL.layout
  • Loading branch information
jwellbelove committed Feb 26, 2018
1 parent 9a92110 commit 1e2866a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Embedded Template Library
version=10.21.0
version=10.21.1
author= John Wellbelove <[email protected]>
maintainer=John Wellbelove <[email protected]>
sentence=A C++ template library tailored for embedded systems.
Expand Down
12 changes: 10 additions & 2 deletions src/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -645,12 +645,20 @@ namespace etl

TBase& operator()(uint_least8_t* p_data, uint_least8_t typeId)
{
return reinterpret_cast<U1&>(*p_data);
switch (typeId)
{
case 0: return reinterpret_cast<U1&>(*p_data);
default: return reinterpret_cast<TBase&>(*reinterpret_cast<TBase*>(0));
}
}

const TBase& operator()(uint_least8_t* p_data, uint_least8_t typeId) const
{
return reinterpret_cast<const U1&>(*p_data);
switch (typeId)
{
case 0: return reinterpret_cast<const U1&>(*p_data);
default: return reinterpret_cast<const TBase&>(*reinterpret_cast<const TBase*>(0));
}
}
};

Expand Down
4 changes: 4 additions & 0 deletions support/Release notes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
===============================================================================
10.21.1
Removal of GCC warnings from variant.h.

===============================================================================
10.21.0
Completion of operator set for etl::optional
Expand Down

0 comments on commit 1e2866a

Please sign in to comment.