diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-10-22 16:55:21 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-10-22 16:55:21 +0200 |
commit | affc714b3808507eb0c5f451292c8fd56da032f9 (patch) | |
tree | 47f0f7d0503f9af4cc8e348c1ce62f24d4bcb8fa /TAO/TAO_IDL | |
parent | cc290bf7f2023fe5ceb8834d5eac300e9cfb8522 (diff) | |
download | ATCD-affc714b3808507eb0c5f451292c8fd56da032f9.tar.gz |
Don't use strncpy in native_ch.cpp to fix compiler warning
Use override/default
* ACE/ace/Event_Handler.h:
* TAO/TAO_IDL/be/be_array.cpp:
* TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp:
* TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp:
* TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp:
* TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp:
* TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp:
* TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp:
* TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp:
* TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp:
* TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp:
* TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp:
* TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp:
* TAO/TAO_IDL/be/be_visitor_enum/enum_cs.cpp:
* TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp:
* TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp:
* TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp:
* TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp:
* TAO/TAO_IDL/be/be_visitor_structure/structure.cpp:
* TAO/TAO_IDL/be_include/be_array.h:
* TAO/TAO_IDL/be_include/be_visitor_argument/invoke_cs.h:
* TAO/TAO_IDL/be_include/be_visitor_argument/marshal_ss.h:
* TAO/TAO_IDL/be_include/be_visitor_argument/upcall_ss.h:
* TAO/TAO_IDL/be_include/be_visitor_argument/vardecl_ss.h:
* TAO/TAO_IDL/be_include/be_visitor_array/any_op_ch.h:
* TAO/TAO_IDL/be_include/be_visitor_array/any_op_cs.h:
* TAO/TAO_IDL/be_include/be_visitor_array/array.h:
* TAO/TAO_IDL/be_include/be_visitor_array/array_ch.h:
* TAO/TAO_IDL/be_include/be_visitor_array/array_ci.h:
* TAO/TAO_IDL/be_include/be_visitor_array/array_cs.h:
* TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_ch.h:
* TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_ci.h:
* TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_cs.h:
* TAO/TAO_IDL/be_include/be_visitor_component/executor_exs.h:
* TAO/TAO_IDL/be_include/be_visitor_component/servant_svh.h:
* TAO/TAO_IDL/be_include/be_visitor_component/servant_svs.h:
* TAO/TAO_IDL/be_include/be_visitor_enum/any_op_ch.h:
* TAO/TAO_IDL/be_include/be_visitor_enum/cdr_op_cs.h:
* TAO/TAO_IDL/be_include/be_visitor_enum/enum_ch.h:
* TAO/TAO_IDL/be_include/be_visitor_enum/enum_cs.h:
* TAO/TAO_IDL/be_include/be_visitor_native/native_ch.h:
* TAO/TAO_IDL/be_include/be_visitor_sequence/cdr_op_cs.h:
* TAO/TAO_IDL/be_include/be_visitor_structure/any_op_ch.h:
* TAO/TAO_IDL/be_include/be_visitor_structure/any_op_cs.h:
* TAO/TAO_IDL/be_include/be_visitor_structure/cdr_op_ch.h:
* TAO/TAO_IDL/be_include/be_visitor_structure/structure.h:
* TAO/TAO_IDL/include/ast_concrete_type.h:
* TAO/TAO_IDL/include/ast_type.h:
* TAO/TAO_IDL/util/utl_exceptlist.cpp:
Diffstat (limited to 'TAO/TAO_IDL')
48 files changed, 76 insertions, 228 deletions
diff --git a/TAO/TAO_IDL/be/be_array.cpp b/TAO/TAO_IDL/be/be_array.cpp index beb3256d603..1a0c3f8dc76 100644 --- a/TAO/TAO_IDL/be/be_array.cpp +++ b/TAO/TAO_IDL/be/be_array.cpp @@ -52,10 +52,6 @@ be_array::be_array (UTL_ScopedName *n, } } -be_array::~be_array () -{ -} - int be_array::create_name () { diff --git a/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp index ed5cb8e796f..c705cd2d96f 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp @@ -18,10 +18,6 @@ be_visitor_array_any_op_ch::be_visitor_array_any_op_ch ( { } -be_visitor_array_any_op_ch::~be_visitor_array_any_op_ch () -{ -} - int be_visitor_array_any_op_ch::visit_array (be_array *node) { diff --git a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp index cd6b9c256c3..6d545808640 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp @@ -18,10 +18,6 @@ be_visitor_array_any_op_cs::be_visitor_array_any_op_cs ( { } -be_visitor_array_any_op_cs::~be_visitor_array_any_op_cs () -{ -} - int be_visitor_array_any_op_cs::visit_array (be_array *node) { diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp index bfcec987fbd..396d0aba553 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp @@ -17,10 +17,6 @@ be_visitor_array_ch::be_visitor_array_ch (be_visitor_context *ctx) { } -be_visitor_array_ch::~be_visitor_array_ch () -{ -} - int be_visitor_array_ch::visit_array (be_array *node) { TAO_OutStream *os = this->ctx_->stream (); diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp index eafc05c4e2d..28783028257 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp @@ -16,10 +16,6 @@ be_visitor_array_ci::be_visitor_array_ci (be_visitor_context *ctx) { } -be_visitor_array_ci::~be_visitor_array_ci () -{ -} - int be_visitor_array_ci::visit_array (be_array *node) { // Nothing to do if we are imported or code is already generated. diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp index 5904cbcf719..86b8b8b371d 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp @@ -16,10 +16,6 @@ be_visitor_array_cs::be_visitor_array_cs (be_visitor_context *ctx) { } -be_visitor_array_cs::~be_visitor_array_cs () -{ -} - int be_visitor_array_cs::visit_array (be_array *node) { // Nothing to do if we are imported or code is already generated. diff --git a/TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp b/TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp index d2d93264f93..b4b34172117 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/executor_exs.cpp @@ -21,10 +21,6 @@ be_visitor_executor_exs::be_visitor_executor_exs ( { } -be_visitor_executor_exs::~be_visitor_executor_exs () -{ -} - int be_visitor_executor_exs::visit_operation (be_operation *node) { diff --git a/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp b/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp index 9fbd6a8de25..ae755751dcb 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp @@ -17,10 +17,6 @@ be_visitor_servant_svh::be_visitor_servant_svh (be_visitor_context *ctx) { } -be_visitor_servant_svh::~be_visitor_servant_svh () -{ -} - int be_visitor_servant_svh::visit_component (be_component *node) { diff --git a/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp b/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp index 3f081adcfb4..21fc046a951 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp @@ -17,10 +17,6 @@ be_visitor_servant_svs::be_visitor_servant_svs (be_visitor_context *ctx) { } -be_visitor_servant_svs::~be_visitor_servant_svs () -{ -} - int be_visitor_servant_svs::visit_component (be_component *node) { diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp index 1a2c6dc7fd4..af37f51e7c2 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp @@ -17,10 +17,6 @@ be_visitor_enum_any_op_ch::be_visitor_enum_any_op_ch ( { } -be_visitor_enum_any_op_ch::~be_visitor_enum_any_op_ch () -{ -} - int be_visitor_enum_any_op_ch::visit_enum (be_enum *node) { diff --git a/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp index 5ff226289aa..f9a8a698c85 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp @@ -16,10 +16,6 @@ be_visitor_enum_cdr_op_cs::be_visitor_enum_cdr_op_cs (be_visitor_context *ctx) { } -be_visitor_enum_cdr_op_cs::~be_visitor_enum_cdr_op_cs () -{ -} - int be_visitor_enum_cdr_op_cs::visit_enum (be_enum *node) { diff --git a/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp b/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp index 32f9694a2ba..6340ce0039b 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp @@ -22,10 +22,6 @@ be_visitor_enum_ch::be_visitor_enum_ch (be_visitor_context *ctx) { } -be_visitor_enum_ch::~be_visitor_enum_ch () -{ -} - // Visit the enum_ch node and its scope. int be_visitor_enum_ch::visit_enum (be_enum *node) diff --git a/TAO/TAO_IDL/be/be_visitor_enum/enum_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/enum_cs.cpp index aeaac4931ed..e06e3e6f88f 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/enum_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/enum_cs.cpp @@ -22,10 +22,6 @@ be_visitor_enum_cs::be_visitor_enum_cs (be_visitor_context *ctx) { } -be_visitor_enum_cs::~be_visitor_enum_cs () -{ -} - // visit the Enum_cs node and its scope int be_visitor_enum_cs::visit_enum (be_enum *node) diff --git a/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp b/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp index 9017e596896..0ff00c5ff9c 100644 --- a/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp @@ -12,6 +12,7 @@ #include "native.h" #include "be_visitor_typecode/typecode_decl.h" #include "global_extern.h" +#include <cstring> // ******************************************************************** // Visitor implementation for the Native type @@ -23,11 +24,7 @@ be_visitor_native_ch::be_visitor_native_ch (be_visitor_context *ctx) { } -be_visitor_native_ch::~be_visitor_native_ch () -{ -} - -// Visit the native_ch node and its scope. +/// Visit the native_ch node and its scope. int be_visitor_native_ch::visit_native (be_native *node) { @@ -71,15 +68,16 @@ be_visitor_native_ch::visit_native (be_native *node) // strip the "Seq" ending to get the sample's name const char * node_name = node->full_name (); const size_t max_name_length = 2000; - if (ACE_OS::strlen (node_name) >= max_name_length) + const size_t node_name_length = std::strlen (node_name); + if (node_name_length >= max_name_length || + node_name_length <= 3) { return -1; } char sample_name[max_name_length]; - ACE_OS::strncpy (sample_name, - node_name, - ACE_OS::strlen (node_name) - 3); - sample_name[ACE_OS::strlen (node_name) - 3] = '\0'; + // Copy node_name into sample_name and shorten to remove Seq suffix + std::strcpy (sample_name, node_name); + sample_name[node_name_length - 3] = '\0'; *os << be_nl_2 << "typedef ::TAO::DCPS::ZeroCopyDataSeq< " diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp index df8603b9463..616e6662b03 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp @@ -22,10 +22,6 @@ be_visitor_structure_any_op_ch::be_visitor_structure_any_op_ch ( { } -be_visitor_structure_any_op_ch::~be_visitor_structure_any_op_ch () -{ -} - int be_visitor_structure_any_op_ch::visit_structure (be_structure *node) { diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp index aa234e85fa4..1cf479aefdf 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp @@ -23,10 +23,6 @@ be_visitor_structure_any_op_cs::be_visitor_structure_any_op_cs ( { } -be_visitor_structure_any_op_cs::~be_visitor_structure_any_op_cs () -{ -} - int be_visitor_structure_any_op_cs::visit_structure (be_structure *node) { diff --git a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp index 4c873c0e7ec..dec58f3f0b4 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp @@ -17,16 +17,11 @@ // *************************************************************************** be_visitor_structure_cdr_op_ch::be_visitor_structure_cdr_op_ch ( - be_visitor_context *ctx - ) + be_visitor_context *ctx) : be_visitor_structure (ctx) { } -be_visitor_structure_cdr_op_ch::~be_visitor_structure_cdr_op_ch () -{ -} - int be_visitor_structure_cdr_op_ch::visit_structure (be_structure *node) { diff --git a/TAO/TAO_IDL/be/be_visitor_structure/structure.cpp b/TAO/TAO_IDL/be/be_visitor_structure/structure.cpp index ecd2ee05479..f1626f3d2cf 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/structure.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/structure.cpp @@ -16,10 +16,6 @@ be_visitor_structure::be_visitor_structure (be_visitor_context *ctx) { } -be_visitor_structure::~be_visitor_structure () -{ -} - int be_visitor_structure::visit_structure (be_structure *) { diff --git a/TAO/TAO_IDL/be_include/be_array.h b/TAO/TAO_IDL/be_include/be_array.h index d021e5125be..02a0ffdf6be 100644 --- a/TAO/TAO_IDL/be_include/be_array.h +++ b/TAO/TAO_IDL/be_include/be_array.h @@ -31,7 +31,7 @@ public: bool local, bool abstract); - ~be_array (); + ~be_array () override = default; /// Generate dimensions. If slice == 1, generate dimensions for the slice /// definition. @@ -39,24 +39,24 @@ public: unsigned short slice = 0); /// Overridden from class be_type. - virtual void gen_ostream_operator (TAO_OutStream *os, - bool use_underscore); - virtual void gen_member_ostream_operator (TAO_OutStream *os, - const char *instance_name, - bool use_underscore, - bool accessor); + void gen_ostream_operator (TAO_OutStream *os, + bool use_underscore) override; + void gen_member_ostream_operator (TAO_OutStream *os, + const char *instance_name, + bool use_underscore, + bool accessor) override; // Visiting. - virtual int accept (be_visitor *visitor); + int accept (be_visitor *visitor) override; // Cleanup. - virtual void destroy (); + void destroy () override; protected: /// Create a name for us. virtual int create_name (); - virtual void compute_tc_name (); + void compute_tc_name () override; }; #endif diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/invoke_cs.h b/TAO/TAO_IDL/be_include/be_visitor_argument/invoke_cs.h index 023e96be6c2..d60d2ce918b 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_argument/invoke_cs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/invoke_cs.h @@ -14,10 +14,6 @@ #ifndef _BE_VISITOR_ARGUMENT_INVOKE_CS_H_ #define _BE_VISITOR_ARGUMENT_INVOKE_CS_H_ -// ************************************************************ -// class be_visitor_args_invoke_cs -// ************************************************************ - /** * @class be_visitor_args_invoke_cs * diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/marshal_ss.h b/TAO/TAO_IDL/be_include/be_visitor_argument/marshal_ss.h index 05e7225bd3b..1e30c14b363 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_argument/marshal_ss.h +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/marshal_ss.h @@ -14,10 +14,6 @@ #ifndef _BE_VISITOR_ARGUMENT_MARSHAL_SS_H_ #define _BE_VISITOR_ARGUMENT_MARSHAL_SS_H_ -// ************************************************************ -// class be_visitor_args_marshal_ss -// ************************************************************ - /** * @class be_visitor_args_marshal_ss * diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/upcall_ss.h b/TAO/TAO_IDL/be_include/be_visitor_argument/upcall_ss.h index 42b8d547675..8f7d850574e 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_argument/upcall_ss.h +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/upcall_ss.h @@ -14,10 +14,6 @@ #ifndef _BE_VISITOR_ARGUMENT_UPCALL_SS_H_ #define _BE_VISITOR_ARGUMENT_UPCALL_SS_H_ -// ************************************************************ -// class be_visitor_args_upcall_ss -// ************************************************************ - /** * @class be_visitor_args_upcall_ss * diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/vardecl_ss.h b/TAO/TAO_IDL/be_include/be_visitor_argument/vardecl_ss.h index 0fc6fd6c3a0..2000dcf2c52 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_argument/vardecl_ss.h +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/vardecl_ss.h @@ -14,10 +14,6 @@ #ifndef _BE_VISITOR_ARGUMENT_VARDECL_SS_H_ #define _BE_VISITOR_ARGUMENT_VARDECL_SS_H_ -// ************************************************************ -// class be_visitor_args_vardecl_ss -// ************************************************************ - /** * @class be_visitor_args_vardecl_ss * diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/any_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_array/any_op_ch.h index b6463d0753f..8b82a38a83f 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_array/any_op_ch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_array/any_op_ch.h @@ -14,10 +14,6 @@ #ifndef _BE_VISITOR_ARRAY_ANY_OP_CH_H_ #define _BE_VISITOR_ARRAY_ANY_OP_CH_H_ -// ************************************************************ -// class be_visitor_array_any_op_ch -// ************************************************************ - /** * @class be_visitor_array_any_op_ch * @@ -28,17 +24,15 @@ */ class be_visitor_array_any_op_ch : public be_visitor_decl { - public: /// constructor be_visitor_array_any_op_ch (be_visitor_context *ctx); /// destructor - ~be_visitor_array_any_op_ch (); + ~be_visitor_array_any_op_ch () override = default; /// visit array - virtual int visit_array (be_array *node); - + int visit_array (be_array *node) override; }; #endif /* _BE_VISITOR_ARRAY_ANY_OP_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/any_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_array/any_op_cs.h index 776a873402e..acf2f310096 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_array/any_op_cs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_array/any_op_cs.h @@ -14,10 +14,6 @@ #ifndef _BE_VISITOR_ARRAY_ANY_OP_CS_H_ #define _BE_VISITOR_ARRAY_ANY_OP_CS_H_ -// ************************************************************ -// class be_visitor_array_cs -// ************************************************************ - /** * @class be_visitor_array_any_op_cs * @@ -28,17 +24,15 @@ */ class be_visitor_array_any_op_cs : public be_visitor_decl { - public: /// constructor be_visitor_array_any_op_cs (be_visitor_context *ctx); /// destructor - ~be_visitor_array_any_op_cs (); + ~be_visitor_array_any_op_cs () override = default; /// visit array - virtual int visit_array (be_array *node); - + int visit_array (be_array *node) override; }; #endif /* _BE_VISITOR_ARRAY_ANY_OP_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/array.h b/TAO/TAO_IDL/be_include/be_visitor_array/array.h index b44e9e6a4a2..515645f1d47 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_array/array.h +++ b/TAO/TAO_IDL/be_include/be_visitor_array/array.h @@ -13,10 +13,6 @@ #ifndef _BE_VISITOR_ARRAY_ARRAY_H_ #define _BE_VISITOR_ARRAY_ARRAY_H_ -// ************************************************************ -// class be_visitor_array -// ************************************************************ - /** * @class be_visitor_array * @@ -75,13 +71,11 @@ public: virtual int visit_union (be_union *node); protected: - /// helper that does the common job int visit_node (be_type *); /// helper that does the common job int emit_common (be_type *node); - }; #endif /* _BE_VISITOR_ARRAY_ARRAY_H_*/ diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/array_ch.h b/TAO/TAO_IDL/be_include/be_visitor_array/array_ch.h index 4f0d219a1e6..e23a3cf1e72 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_array/array_ch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_array/array_ch.h @@ -13,10 +13,6 @@ #ifndef _BE_VISITOR_ARRAY_CH_H_ #define _BE_VISITOR_ARRAY_CH_H_ -// ************************************************************ -// class be_visitor_array_ch -// ************************************************************ - /** * @class be_visitor_array_ch * @@ -31,10 +27,10 @@ public: be_visitor_array_ch (be_visitor_context *ctx); /// destructor - virtual ~be_visitor_array_ch (); + ~be_visitor_array_ch () override = default; /// visit the array node - virtual int visit_array (be_array *node); + int visit_array (be_array *node) override; }; #endif /* _BE_VISITOR_ARRAY_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/array_ci.h b/TAO/TAO_IDL/be_include/be_visitor_array/array_ci.h index 67ff101da07..ff9722bd29b 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_array/array_ci.h +++ b/TAO/TAO_IDL/be_include/be_visitor_array/array_ci.h @@ -9,14 +9,9 @@ */ //============================================================================= - #ifndef _BE_VISITOR_ARRAY_CI_H_ #define _BE_VISITOR_ARRAY_CI_H_ -// ************************************************************ -// class be_visitor_array_ci -// ************************************************************ - /** * @class be_visitor_array_ci * @@ -31,10 +26,10 @@ public: be_visitor_array_ci (be_visitor_context *ctx); /// destructor - virtual ~be_visitor_array_ci (); + ~be_visitor_array_ci () override = default; /// visit the array node - virtual int visit_array (be_array *node); + int visit_array (be_array *node) override; }; #endif /* _BE_VISITOR_ARRAY_CI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/array_cs.h b/TAO/TAO_IDL/be_include/be_visitor_array/array_cs.h index 43f734b8916..57ff835a5bb 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_array/array_cs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_array/array_cs.h @@ -9,14 +9,9 @@ */ //============================================================================= - #ifndef _BE_VISITOR_ARRAY_CS_H_ #define _BE_VISITOR_ARRAY_CS_H_ -// ************************************************************ -// class be_visitor_array_cs -// ************************************************************ - /** * @class be_visitor_array_cs * @@ -31,10 +26,10 @@ public: be_visitor_array_cs (be_visitor_context *ctx); /// destructor - virtual ~be_visitor_array_cs (); + ~be_visitor_array_cs () override = default; /// visit the array node - virtual int visit_array (be_array *node); + int visit_array (be_array *node) override; }; #endif /* _BE_VISITOR_ARRAY_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_ch.h index fbcfc930785..642e0cb8b80 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_ch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_ch.h @@ -14,10 +14,6 @@ #ifndef _BE_VISITOR_ARRAY_CDR_OP_CH_H_ #define _BE_VISITOR_ARRAY_CDR_OP_CH_H_ -// ************************************************************ -// class be_visitor_array_cdr_op_ch -// ************************************************************ - /** * @class be_visitor_array_cdr_op_ch * diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_ci.h b/TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_ci.h index d4a073e81ba..b0b1a64adfa 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_ci.h +++ b/TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_ci.h @@ -14,10 +14,6 @@ #ifndef _BE_VISITOR_ARRAY_CDR_OP_CI_H_ #define _BE_VISITOR_ARRAY_CDR_OP_CI_H_ -// ************************************************************ -// class be_visitor_array_cdr_op_ci -// ************************************************************ - /** * @class be_visitor_array_cdr_op_ci * diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_cs.h index e7d71720731..74e27770b22 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_cs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_array/cdr_op_cs.h @@ -17,10 +17,6 @@ #ifndef _BE_VISITOR_ARRAY_CDR_OP_CS_H_ #define _BE_VISITOR_ARRAY_CDR_OP_CS_H_ -// ************************************************************ -// class be_visitor_array_cdr_op_cs -// ************************************************************ - /** * @class be_visitor_array_cdr_op_cs * @@ -32,7 +28,6 @@ */ class be_visitor_array_cdr_op_cs : public be_visitor_decl { - public: /// constructor be_visitor_array_cdr_op_cs (be_visitor_context *ctx); diff --git a/TAO/TAO_IDL/be_include/be_visitor_component/executor_exs.h b/TAO/TAO_IDL/be_include/be_visitor_component/executor_exs.h index 114f5683ca8..07f40ba9a42 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_component/executor_exs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_component/executor_exs.h @@ -23,7 +23,7 @@ class be_visitor_executor_exs public: be_visitor_executor_exs (be_visitor_context *ctx); - ~be_visitor_executor_exs (); + ~be_visitor_executor_exs () = default; virtual int visit_operation (be_operation *node); virtual int visit_attribute (be_attribute *node); diff --git a/TAO/TAO_IDL/be_include/be_visitor_component/servant_svh.h b/TAO/TAO_IDL/be_include/be_visitor_component/servant_svh.h index b9f017e416f..d87d3309fd3 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_component/servant_svh.h +++ b/TAO/TAO_IDL/be_include/be_visitor_component/servant_svh.h @@ -27,7 +27,7 @@ class be_visitor_servant_svh : public be_visitor_component_scope public: be_visitor_servant_svh (be_visitor_context *ctx); - ~be_visitor_servant_svh (); + ~be_visitor_servant_svh () = default; virtual int visit_component (be_component *node); virtual int visit_connector (be_connector *node); diff --git a/TAO/TAO_IDL/be_include/be_visitor_component/servant_svs.h b/TAO/TAO_IDL/be_include/be_visitor_component/servant_svs.h index f9cac557f89..eb1c0223e6d 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_component/servant_svs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_component/servant_svs.h @@ -24,7 +24,7 @@ class be_visitor_servant_svs public: be_visitor_servant_svs (be_visitor_context *ctx); - ~be_visitor_servant_svs (); + ~be_visitor_servant_svs () = default; virtual int visit_component (be_component *node); virtual int visit_connector (be_connector *node); diff --git a/TAO/TAO_IDL/be_include/be_visitor_enum/any_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_enum/any_op_ch.h index a5d46ffa8a7..f009b9ec830 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_enum/any_op_ch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_enum/any_op_ch.h @@ -10,7 +10,6 @@ */ //============================================================================= - #ifndef _BE_VISITOR_ENUM_ANY_OP_CH_H_ #define _BE_VISITOR_ENUM_ANY_OP_CH_H_ @@ -24,16 +23,15 @@ */ class be_visitor_enum_any_op_ch : public be_visitor_scope { - public: /// constructor be_visitor_enum_any_op_ch (be_visitor_context *ctx); /// destructor - ~be_visitor_enum_any_op_ch (); + ~be_visitor_enum_any_op_ch () override = default; /// visit enum - virtual int visit_enum (be_enum *node); + int visit_enum (be_enum *node) override; }; #endif /* _BE_VISITOR_ENUM_ANY_OP_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_enum/cdr_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_enum/cdr_op_cs.h index c7a39686789..c3e37f0ef92 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_enum/cdr_op_cs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_enum/cdr_op_cs.h @@ -10,7 +10,6 @@ */ //============================================================================= - #ifndef _BE_VISITOR_ENUM_CDR_OP_CS_H_ #define _BE_VISITOR_ENUM_CDR_OP_CS_H_ @@ -30,10 +29,10 @@ public: be_visitor_enum_cdr_op_cs (be_visitor_context *ctx); /// destructor - ~be_visitor_enum_cdr_op_cs (); + ~be_visitor_enum_cdr_op_cs () override = default; /// visit enum - virtual int visit_enum (be_enum *node); + int visit_enum (be_enum *node) override; }; #endif /* _BE_VISITOR_ENUM_CDR_OP_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_enum/enum_ch.h b/TAO/TAO_IDL/be_include/be_visitor_enum/enum_ch.h index c1514b5f712..b96a7d6955c 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_enum/enum_ch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_enum/enum_ch.h @@ -24,24 +24,22 @@ class be_visitor_enum_ch : public be_visitor_scope { public: - /// conenumor + /// constructor be_visitor_enum_ch (be_visitor_context *ctx); - /// deenumor - ~be_visitor_enum_ch (); + /// destructor + ~be_visitor_enum_ch () override = default; /// visit enum. - virtual int visit_enum (be_enum *node); + int visit_enum (be_enum *node) override; // =visit operations on syntactically valid elements in our scope /// visit enum_val - virtual int visit_enum_val (be_enum_val *node); - - // = helper + int visit_enum_val (be_enum_val *node) override; /// generate a comma after each element is processed - virtual int post_process (be_decl *); + int post_process (be_decl *) override; }; #endif /* _BE_VISITOR_ENUM_ENUM_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_enum/enum_cs.h b/TAO/TAO_IDL/be_include/be_visitor_enum/enum_cs.h index dcb06a90627..15ced5417b2 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_enum/enum_cs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_enum/enum_cs.h @@ -10,7 +10,6 @@ */ //============================================================================= - #ifndef _BE_VISITOR_ENUM_ENUM_CS_H_ #define _BE_VISITOR_ENUM_ENUM_CS_H_ @@ -24,14 +23,14 @@ class be_visitor_enum_cs : public be_visitor_scope { public: - /// conenumor + /// constructor be_visitor_enum_cs (be_visitor_context *ctx); - /// deenumor - ~be_visitor_enum_cs (); + /// destructor + ~be_visitor_enum_cs () override = default; /// visit enum and generate the typecode - virtual int visit_enum (be_enum *node); + int visit_enum (be_enum *node) override; }; #endif /* _BE_VISITOR_ENUM_ENUM_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_native/native_ch.h b/TAO/TAO_IDL/be_include/be_visitor_native/native_ch.h index 3e2e37c3562..b43245c5b37 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_native/native_ch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_native/native_ch.h @@ -10,7 +10,6 @@ */ //============================================================================= - #ifndef _BE_VISITOR_NATIVE_NATIVE_CH_H_ #define _BE_VISITOR_NATIVE_NATIVE_CH_H_ @@ -19,19 +18,19 @@ * * @brief be_visitor_native_ch * - * This is the base visitor for enum for the header file + * This is the base visitor for native for the header file */ class be_visitor_native_ch : public be_visitor_scope { public: - /// conenumor + /// constructor be_visitor_native_ch (be_visitor_context *ctx); - /// deenumor - ~be_visitor_native_ch (); + /// destructor + ~be_visitor_native_ch () override = default; /// visit native. - virtual int visit_native (be_native *node); + int visit_native (be_native *node) override; }; #endif /* _BE_VISITOR_NATIVE_NATIVE_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_sequence/cdr_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_sequence/cdr_op_cs.h index 530d6f85398..1c10aa152cf 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_sequence/cdr_op_cs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_sequence/cdr_op_cs.h @@ -14,10 +14,6 @@ #ifndef _BE_VISITOR_SEQUENCE_CDR_OP_CS_H_ #define _BE_VISITOR_SEQUENCE_CDR_OP_CS_H_ -// ************************************************************ -// class be_visitor_sequence_cs -// ************************************************************ - /** * @class be_visitor_sequence_cdr_op_cs * @@ -28,7 +24,6 @@ */ class be_visitor_sequence_cdr_op_cs : public be_visitor_decl { - public: /// constructor be_visitor_sequence_cdr_op_cs (be_visitor_context *ctx); @@ -93,7 +88,6 @@ public: virtual int visit_union (be_union *node); protected: - /// helper that does the common job int visit_node (be_type *); diff --git a/TAO/TAO_IDL/be_include/be_visitor_structure/any_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_structure/any_op_ch.h index c7d3270ab32..7085a6f2bd0 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_structure/any_op_ch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_structure/any_op_ch.h @@ -26,13 +26,12 @@ */ class be_visitor_structure_any_op_ch : public be_visitor_structure { - public: /// constructor be_visitor_structure_any_op_ch (be_visitor_context *ctx); /// destructor - ~be_visitor_structure_any_op_ch (); + ~be_visitor_structure_any_op_ch () = default; /// visit structure virtual int visit_structure (be_structure *node); diff --git a/TAO/TAO_IDL/be_include/be_visitor_structure/any_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_structure/any_op_cs.h index 72d670410f6..36a99eebdc2 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_structure/any_op_cs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_structure/any_op_cs.h @@ -26,13 +26,12 @@ */ class be_visitor_structure_any_op_cs : public be_visitor_structure { - public: /// constructor be_visitor_structure_any_op_cs (be_visitor_context *ctx); /// destructor - ~be_visitor_structure_any_op_cs (); + ~be_visitor_structure_any_op_cs () = default; /// visit structure virtual int visit_structure (be_structure *node); diff --git a/TAO/TAO_IDL/be_include/be_visitor_structure/cdr_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_structure/cdr_op_ch.h index a5d002c62e4..0b8058d3d22 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_structure/cdr_op_ch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_structure/cdr_op_ch.h @@ -26,13 +26,12 @@ */ class be_visitor_structure_cdr_op_ch : public be_visitor_structure { - public: /// constructor be_visitor_structure_cdr_op_ch (be_visitor_context *ctx); /// destructor - ~be_visitor_structure_cdr_op_ch (); + ~be_visitor_structure_cdr_op_ch () = default; /// visit structure virtual int visit_structure (be_structure *node); diff --git a/TAO/TAO_IDL/be_include/be_visitor_structure/structure.h b/TAO/TAO_IDL/be_include/be_visitor_structure/structure.h index afc9cffa36e..d2c31903e83 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_structure/structure.h +++ b/TAO/TAO_IDL/be_include/be_visitor_structure/structure.h @@ -11,7 +11,6 @@ */ //============================================================================= - #ifndef _BE_VISITOR_STRUCTURE_STRUCTURE_H_ #define _BE_VISITOR_STRUCTURE_STRUCTURE_H_ @@ -25,19 +24,19 @@ class be_visitor_structure : public be_visitor_scope { public: - /// constructureor + /// constructur be_visitor_structure (be_visitor_context *ctx); - /// destructureor - ~be_visitor_structure (); + /// destructur + ~be_visitor_structure () override = default; /// visit structure. We provide code for this method in the derived class - virtual int visit_structure (be_structure *node); + int visit_structure (be_structure *node) override; // =visit operations on syntactically valid elements in our scope /// visit field - virtual int visit_field (be_field *node); + int visit_field (be_field *node) override; }; #endif /* _BE_VISITOR_STRUCTURE_STRUCTURE_H_ */ diff --git a/TAO/TAO_IDL/include/ast_concrete_type.h b/TAO/TAO_IDL/include/ast_concrete_type.h index cd00db1cfbe..106110d9821 100644 --- a/TAO/TAO_IDL/include/ast_concrete_type.h +++ b/TAO/TAO_IDL/include/ast_concrete_type.h @@ -69,7 +69,6 @@ trademarks or registered trademarks of Sun Microsystems, Inc. // Class for all concrete types. // This is useful to group together IDL types other than objects. - class TAO_IDL_FE_Export AST_ConcreteType : public virtual AST_Type { public: diff --git a/TAO/TAO_IDL/include/ast_type.h b/TAO/TAO_IDL/include/ast_type.h index db8a9c0f11a..a120f8b7410 100644 --- a/TAO/TAO_IDL/include/ast_type.h +++ b/TAO/TAO_IDL/include/ast_type.h @@ -73,43 +73,42 @@ trademarks or registered trademarks of Sun Microsystems, Inc. // // This is useful wherever any IDL type defining construct can appear // such as the base type for a typedef or array. - class TAO_IDL_FE_Export AST_Type : public virtual AST_Decl { public: + /// Indicates if we are fixed size or variable. Most useful for structs, + /// unions, and arrays. enum SIZE_TYPE { SIZE_UNKNOWN, FIXED, VARIABLE }; - // Indicates if we are fixed size or variable. Most useful for structs, - // unions, and arrays. AST_Type (AST_Decl::NodeType nt, UTL_ScopedName *n); virtual ~AST_Type (); - virtual bool in_recursion (ACE_Unbounded_Queue<AST_Type *> &list); // Determine if we are involved in some kind of limited recursion. // Most types cannot be involved except structs and unions. // The head element of the list the possibly recursed type we are checking for. // If the list is empty, we are trying to determine this for ourselves. + virtual bool in_recursion (ACE_Unbounded_Queue<AST_Type *> &list); - virtual void size_type (SIZE_TYPE); // Set the size type. + virtual void size_type (SIZE_TYPE); - virtual SIZE_TYPE size_type (); // Return our size type. + virtual SIZE_TYPE size_type (); // Accessors/mutators for the private members. - bool has_constructor (); // Accessor for protected member. + bool has_constructor (); - void has_constructor (bool value); // Mutator for protected member. + void has_constructor (bool value); bool ifr_added (); void ifr_added (bool val); @@ -117,18 +116,18 @@ public: bool ifr_fwd_added (); void ifr_fwd_added (bool val); + // Type name of a node used when generating declarations. const char *nested_type_name (AST_Decl *d, const char *suffix = 0, const char *prefix = 0); - // Type name of a node used when generating declarations. - AST_Type *unaliased_type (); // Utility function to make sure we are using the unaliased type. + AST_Type *unaliased_type (); - virtual bool legal_for_primary_key () const; // Recursively called on valuetype to check for legal use as // a primary key. Overridden for valuetype, struct, sequence, // union, array, typedef, and interface. + virtual bool legal_for_primary_key () const; // Visiting. virtual int ast_accept (ast_visitor *visitor); @@ -137,15 +136,15 @@ public: virtual void destroy (); protected: - virtual int compute_size_type (); // Determine our size type and set it if it is unknown. + virtual int compute_size_type (); + // Type name of a node used when generating declarations. const char *nested_name (const char *local_name, const char *full_name, AST_Decl *use_scope, const char *suffix, const char *prefix); - // Type name of a node used when generating declarations. bool match_names (AST_Type *t, ACE_Unbounded_Queue<AST_Type *> &list); @@ -157,21 +156,21 @@ protected: // Has this node been forward declared in this IDL file? bool ifr_fwd_added_; - SIZE_TYPE size_type_; // Whether we are fixed or variable size (by default fixed). + SIZE_TYPE size_type_; - bool has_constructor_; // Attribute that helps a union determine whether a member // should be included by value or by reference. + bool has_constructor_; - char *nested_type_name_; // For the corresponding method. + char *nested_type_name_; - long in_recursion_; // Storage once the value has been computed. + long in_recursion_; - mutable bool recursing_in_legal_pk_; // Node-specific flag to abort recursion in legal_for_primary_key(). + mutable bool recursing_in_legal_pk_; }; #endif // _AST_TYPE_AST_TYPE_HH diff --git a/TAO/TAO_IDL/util/utl_exceptlist.cpp b/TAO/TAO_IDL/util/utl_exceptlist.cpp index 93e55ebbb17..b99c8fa420b 100644 --- a/TAO/TAO_IDL/util/utl_exceptlist.cpp +++ b/TAO/TAO_IDL/util/utl_exceptlist.cpp @@ -95,7 +95,6 @@ UTL_ExceptList::head () // class UTL_List's private member). This is so we // can avoid copying the contained quantity, an // AST_Exception. - void UTL_ExceptList::destroy () { |