From 733a2bc667a9998681ce4067c792fd1f96861e62 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 21 Oct 2024 10:09:06 +0200 Subject: [PATCH] Cleanup and simplify CDR code for bitmask * ridlbe/c++11/templates/cli/src/bitmask_cdr.erb: --- ridlbe/c++11/templates/cli/src/bitmask_cdr.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ridlbe/c++11/templates/cli/src/bitmask_cdr.erb b/ridlbe/c++11/templates/cli/src/bitmask_cdr.erb index ce62a78e..b673a44d 100644 --- a/ridlbe/c++11/templates/cli/src/bitmask_cdr.erb +++ b/ridlbe/c++11/templates/cli/src/bitmask_cdr.erb @@ -2,8 +2,8 @@ // generated from <%= ridl_template_path %> TAO_CORBA::Boolean operator<< (TAO_OutputCDR &strm, const <%= scoped_cxxname %> &_tao_bitmask) { - std::underlying_type_t<<%= scoped_cxxname %>::_flags> const _tao_temp { _tao_bitmask }; - return strm << <%= bitbound.cdr_from_fmt % "_tao_temp" %>; +% _arg = "std::underlying_type_t<#{scoped_cxxname}::_flags>(_tao_bitmask)" + return strm << <%= bitbound.cdr_from_fmt % _arg %>; } TAO_CORBA::Boolean operator>> (TAO_InputCDR &strm, <%= scoped_cxxname %> &_tao_bitmask) @@ -13,7 +13,7 @@ TAO_CORBA::Boolean operator>> (TAO_InputCDR &strm, <%= scoped_cxxname %> &_tao_b if (_tao_success) { - _tao_bitmask = static_cast<<%= scoped_cxxtype %>> (_tao_temp); + _tao_bitmask = <%= scoped_cxxtype %> (_tao_temp); } return _tao_success;