From 0bafbd77bb87bf6e4590dffe0e50e0b1533d353c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gonz=C3=A1lez?= Date: Thu, 9 May 2024 14:24:22 +0200 Subject: [PATCH] Fix windows warning with an union with boolean discriminator [20975] (#339) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refs 20973. Fix windows warning Signed-off-by: Ricardo González Moreno * Refs 20973. Update submodule Signed-off-by: Ricardo González Moreno --------- Signed-off-by: Ricardo González Moreno --- .../com/eprosima/fastcdr/idl/templates/TypesHeader.stg | 2 +- .../fastdds/idl/templates/TypesCdrAuxHeaderImpl.stg | 8 ++++---- thirdparty/idl-parser | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/eprosima/fastcdr/idl/templates/TypesHeader.stg b/src/main/java/com/eprosima/fastcdr/idl/templates/TypesHeader.stg index 93200dbe..8d5447ea 100644 --- a/src/main/java/com/eprosima/fastcdr/idl/templates/TypesHeader.stg +++ b/src/main/java/com/eprosima/fastcdr/idl/templates/TypesHeader.stg @@ -473,7 +473,7 @@ public: $union.members: { member | $public_union_member_declaration(union, member)$}; separator="\n"$ - $if(!union.defaultMember)$ + $if(union.needDefaultCase)$ void _default() { if (member_destructor_) diff --git a/src/main/java/com/eprosima/fastdds/idl/templates/TypesCdrAuxHeaderImpl.stg b/src/main/java/com/eprosima/fastdds/idl/templates/TypesCdrAuxHeaderImpl.stg index 8f597fe6..bae6a051 100644 --- a/src/main/java/com/eprosima/fastdds/idl/templates/TypesCdrAuxHeaderImpl.stg +++ b/src/main/java/com/eprosima/fastdds/idl/templates/TypesCdrAuxHeaderImpl.stg @@ -259,7 +259,7 @@ eProsima_user_DllExport size_t calculate_serialized_size( data.$member.name$(), current_alignment); break; }; separator="\n"$ - $if(!union.defaultMember)$ + $if(union.needDefaultCase)$ default: break; $endif$ @@ -298,7 +298,7 @@ eProsima_user_DllExport void serialize( scdr << eprosima::fastcdr::MemberId($if(union.annotationMutable)$$member.id$$else$$member.index$$endif$) << data.$member.name$(); break; }; separator="\n"$ - $if(!union.defaultMember)$ + $if(union.needDefaultCase)$ default: break; $endif$ @@ -339,7 +339,7 @@ eProsima_user_DllExport void deserialize( break; \} }; separator="\n"$ - $if(!union.defaultMember)$ + $if(union.needDefaultCase)$ default: data._default(); break; @@ -362,7 +362,7 @@ eProsima_user_DllExport void deserialize( dcdr \>> data.$member.name$(); break; }; separator="\n"$ - $if(!union.defaultMember)$ + $if(union.needDefaultCase)$ default: break; $endif$ diff --git a/thirdparty/idl-parser b/thirdparty/idl-parser index a5367e2a..70f6a4d5 160000 --- a/thirdparty/idl-parser +++ b/thirdparty/idl-parser @@ -1 +1 @@ -Subproject commit a5367e2a75ccb58de3470ec66fa7759d7a1a678f +Subproject commit 70f6a4d5b9d57ca73f9688bea1fb5cdaea7483e6