diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2023-02-13 16:51:27 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2023-02-13 16:51:27 +0100 |
commit | 94392eaddf51af04621f46337b392c688171434f (patch) | |
tree | 0fc48f288387aa388eb2f8456fd8b61df4bdc5fb | |
parent | d2b7bf891f0b11840b5528b89cac105daef04f33 (diff) | |
download | ATCD-94392eaddf51af04621f46337b392c688171434f.tar.gz |
Use constexpr
* TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp:
* TAO/tao/Codeset/UTF16_BOM_Translator.cpp:
* TAO/tao/GIOP_Message_Generator_Parser_12.cpp:
-rw-r--r-- | TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/Codeset/UTF16_BOM_Translator.cpp | 9 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser_12.cpp | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp b/TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp index 6dfda150d7e..30d76194aa1 100644 --- a/TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp +++ b/TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp @@ -338,7 +338,7 @@ TAO::CSD::FW_Server_Request_Wrapper::clone (TAO_Operation_Details const *& from, } else { - static const size_t mb_size = 2048; + static constexpr size_t mb_size = 2048; ACE_NEW_RETURN (cdr, TAO_InputCDR (mb_size), false); diff --git a/TAO/tao/Codeset/UTF16_BOM_Translator.cpp b/TAO/tao/Codeset/UTF16_BOM_Translator.cpp index 4f47a615460..4df509712c8 100644 --- a/TAO/tao/Codeset/UTF16_BOM_Translator.cpp +++ b/TAO/tao/Codeset/UTF16_BOM_Translator.cpp @@ -19,11 +19,10 @@ // **************************************************************** typedef ACE_CDR::UShort ACE_UTF16_T; -static const size_t ACE_UTF16_CODEPOINT_SIZE = sizeof (ACE_UTF16_T); -static const ACE_CDR::ULong ACE_UL_UTF16_CODEPOINT_SIZE = - static_cast<ACE_CDR::ULong>(ACE_UTF16_CODEPOINT_SIZE); -static const unsigned short ACE_UNICODE_BOM_CORRECT = 0xFEFFU; -static const unsigned short ACE_UNICODE_BOM_SWAPPED = 0xFFFEU; +static constexpr size_t ACE_UTF16_CODEPOINT_SIZE = sizeof (ACE_UTF16_T); +static constexpr ACE_CDR::ULong ACE_UL_UTF16_CODEPOINT_SIZE = static_cast<ACE_CDR::ULong>(ACE_UTF16_CODEPOINT_SIZE); +static constexpr unsigned short ACE_UNICODE_BOM_CORRECT = 0xFEFFU; +static constexpr unsigned short ACE_UNICODE_BOM_SWAPPED = 0xFFFEU; TAO_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp index 7cbadbbc658..0dfc12ae0f4 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp @@ -16,7 +16,7 @@ // This is used by GIOP1.2. This is to align the message body on a // 8-octet boundary. This is declared static so that it is in file // scope. -static const size_t TAO_GIOP_MESSAGE_ALIGN_PTR = 8; +static constexpr size_t TAO_GIOP_MESSAGE_ALIGN_PTR = 8; TAO_BEGIN_VERSIONED_NAMESPACE_DECL |