diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-11-03 09:49:53 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-11-03 09:49:53 +0100 |
commit | 257660f8cb9bb5e1cd989e82295d70a4296bc92f (patch) | |
tree | ede0e98f9d0b31926de11c5675682230f9c430d9 | |
parent | 15ea30ccfd13c9fc1ab5ad6a833b2b82df767796 (diff) | |
download | ATCD-257660f8cb9bb5e1cd989e82295d70a4296bc92f.tar.gz |
Reduce amount of empty lines in union generation
* TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp:
* TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp:
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp | 8 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp | 42 |
2 files changed, 25 insertions, 25 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp index 9072ec9a74b..96c6e7b2132 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp @@ -123,8 +123,8 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node) *os << "::CORBA::Boolean operator<< (" << be_idt << be_idt_nl << "TAO_OutputCDR &strm," << be_nl - << "const " << node->name () << " &_tao_union" << be_uidt_nl - << ")" << be_uidt_nl + << "const " << node->name () << " &_tao_union)" << be_uidt + << be_uidt_nl << "{" << be_idt_nl; serialize_disc (os, node->udisc_type (), true /* out */); @@ -169,8 +169,8 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node) this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_INPUT); *os << "::CORBA::Boolean operator>> (" << be_idt << be_idt_nl << "TAO_InputCDR &strm," << be_nl - << node->name () << " &_tao_union" << be_uidt_nl - << ")" << be_uidt_nl + << node->name () << " &_tao_union)" << be_uidt + << be_uidt_nl << "{" << be_idt_nl; be_type* disc_type = diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp index f02c02b38a8..869aadd95ce 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp @@ -145,7 +145,7 @@ be_visitor_union_branch_cdr_op_cs::visit_array (be_array *node) << be_idt << be_idt_nl << "_tao_union_tmp" << be_uidt_nl << ");" << be_uidt_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -203,7 +203,7 @@ be_visitor_union_branch_cdr_op_cs::visit_enum (be_enum *node) case TAO_CodeGen::TAO_CDR_INPUT: *os << node->name () << " _tao_union_tmp =" << be_idt_nl << "static_cast<" << node->name () << "> (0UL);" << be_uidt_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -283,7 +283,7 @@ be_visitor_union_branch_cdr_op_cs::visit_interface (be_interface *node) else { *os << node->name () << "_var _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp.inout ();" << be_nl_2 + << "result = strm >> _tao_union_tmp.inout ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." @@ -363,7 +363,7 @@ be_visitor_union_branch_cdr_op_cs::visit_interface_fwd (be_interface_fwd *node) else { *os << node->name () << "_var _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp.inout ();" << be_nl_2 + << "result = strm >> _tao_union_tmp.inout ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." @@ -442,7 +442,7 @@ be_visitor_union_branch_cdr_op_cs::emit_valuetype_common (be_type *node) { case TAO_CodeGen::TAO_CDR_INPUT: *os << node->name () << "_var _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp.inout ();" << be_nl_2 + << "result = strm >> _tao_union_tmp.inout ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." @@ -506,7 +506,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( { *os << "::CORBA::Object_var _tao_union_tmp;" << be_nl; - *os << "result = strm >> _tao_union_tmp.out ();" << be_nl_2 + *os << "result = strm >> _tao_union_tmp.out ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () << " (_tao_union_tmp.in ());"; @@ -515,7 +515,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( else if (pt == AST_PredefinedType::PT_pseudo) { *os << "::CORBA::TypeCode_var _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp.out ();" << be_nl_2 + << "result = strm >> _tao_union_tmp.out ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () << " (_tao_union_tmp.in ());"; @@ -524,7 +524,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( else if (pt == AST_PredefinedType::PT_value) { *os << "::CORBA::ValueBase * _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () << " (_tao_union_tmp);"; @@ -535,7 +535,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::Char _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_char _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -546,7 +546,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::WChar _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_wchar _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -557,7 +557,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::Octet _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_octet _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -568,7 +568,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::Boolean _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_boolean _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -579,7 +579,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::UInt8 _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_uint8 _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -590,7 +590,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::Int8 _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_int8 _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -599,7 +599,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( else { *os << node->name () << " _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -735,7 +735,7 @@ be_visitor_union_branch_cdr_op_cs::visit_sequence (be_sequence *node) } *os << " _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." @@ -805,19 +805,19 @@ be_visitor_union_branch_cdr_op_cs::visit_string (be_string *node) *os << "result = strm >> ACE_InputCDR::to_string (" << "_tao_union_tmp.out (), " << node->max_size ()->ev ()->u.ulval << ");" - << be_nl_2; + << be_nl; } else { *os << "result = strm >> ACE_InputCDR::to_wstring (" << "_tao_union_tmp.out (), " << node->max_size ()->ev ()->u.ulval << ");" - << be_nl_2; + << be_nl; } } else { - *os << "result = strm >> _tao_union_tmp.out ();" << be_nl_2; + *os << "result = strm >> _tao_union_tmp.out ();" << be_nl; } *os << "if (result)" << be_idt_nl @@ -913,7 +913,7 @@ be_visitor_union_branch_cdr_op_cs::visit_structure (be_structure *node) { case TAO_CodeGen::TAO_CDR_INPUT: *os << node->name () << " _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -1011,7 +1011,7 @@ be_visitor_union_branch_cdr_op_cs::visit_union (be_union *node) case TAO_CodeGen::TAO_CDR_INPUT: *os << node->name () << " _tao_union_tmp" << ";" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () |