summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-06-16 16:32:56 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-06-16 16:32:56 +0200
commit865e24ba171b6357cafeaf79a0b78aae6c29feda (patch)
treecd69fd9ef7c1d3b38eeb3bd5372d6d0fd2bf4462 /TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp
parent943dd53bd48bf4a16c02f98d217c59bbb4b78ea7 (diff)
downloadATCD-865e24ba171b6357cafeaf79a0b78aae6c29feda.tar.gz
Make use of C++11 using in the generated code and more reduced code generation when an operation doesn't have arguments
* TAO/TAO_IDL/be/be_interface.cpp: * TAO/TAO_IDL/be/be_type.cpp: * TAO/TAO_IDL/be/be_valuetype.cpp: * TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp: * TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp b/TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp
index 9e72f70475d..c00fd1c8413 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/arglist.cpp
@@ -18,8 +18,7 @@
// ************************************************************
be_visitor_operation_arglist::be_visitor_operation_arglist (
- be_visitor_context *ctx
- )
+ be_visitor_context *ctx)
: be_visitor_operation (ctx),
unused_ (false)
{
@@ -33,14 +32,14 @@ int
be_visitor_operation_arglist::visit_operation (be_operation *node)
{
TAO_OutStream *os = this->ctx_->stream ();
- bool has_args = node->argument_count () > 0;
+ bool const has_args = node->argument_count () > 0;
- *os << " (" << be_idt_nl;
+ *os << " (";
switch (this->ctx_->state ())
{
case TAO_CodeGen::TAO_OPERATION_ARGLIST_PROXY_IMPL_XS:
- *os << "::CORBA::Object *_collocated_tao_target_";
+ *os << be_idt_nl << "::CORBA::Object *_collocated_tao_target_";
if (has_args)
{
@@ -49,6 +48,14 @@ be_visitor_operation_arglist::visit_operation (be_operation *node)
break;
default:
+ if (has_args)
+ {
+ *os << be_idt_nl;
+ }
+ else
+ {
+ *os << be_idt;
+ }
break;
}
@@ -62,11 +69,6 @@ be_visitor_operation_arglist::visit_operation (be_operation *node)
-1);
}
- if (!has_args)
- {
- *os << "void";
- }
-
*os << ")" << be_uidt;
switch (this->ctx_->state ())