Skip to content

Commit

Permalink
Init changes
Browse files Browse the repository at this point in the history
    * TAO/tao/DynamicAny/DynAny_i.cpp:
    * TAO/tao/DynamicAny/DynCommon.cpp:
    * TAO/tao/DynamicAny/DynSequence_i.cpp:
    * TAO/tao/DynamicAny/DynStruct_i.cpp:
    * TAO/tao/DynamicAny/DynValueBox_i.cpp:
    * TAO/tao/DynamicAny/DynValue_i.cpp:
  • Loading branch information
jwillemsen committed May 21, 2024
1 parent 0030ab8 commit fa28588
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion TAO/tao/DynamicAny/DynAny_i.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ TAO_DynAny_i::set_to_default_value (CORBA::TypeCode_ptr tc)
TAO_OutputCDR stream;
stream << CORBA::Object::_nil ();
TAO_InputCDR in (stream);
TAO::Unknown_IDL_Type *unk = 0;
TAO::Unknown_IDL_Type *unk {};
ACE_NEW (unk,
TAO::Unknown_IDL_Type (tc, in));
this->any_.replace (unk);
Expand Down
2 changes: 1 addition & 1 deletion TAO/tao/DynamicAny/DynCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ TAO_DynCommon::get_abstract ()
CORBA::AbstractBase_var retval;
TAO::Any_Impl *any_impl = this->any_.impl ();

if (any_impl == 0)
if (!any_impl)
{
throw DynamicAny::DynAny::InvalidValue ();
}
Expand Down
8 changes: 4 additions & 4 deletions TAO/tao/DynamicAny/DynSequence_i.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ TAO_DynSequence_i::get_elements_as_dyn_any ()
throw ::CORBA::OBJECT_NOT_EXIST ();
}

DynamicAny::DynAnySeq *retval = 0;
DynamicAny::DynAnySeq *retval {};
ACE_NEW_THROW_EX (retval,
DynamicAny::DynAnySeq (this->component_count_),
CORBA::NO_MEMORY ());
Expand Down Expand Up @@ -522,7 +522,7 @@ TAO_DynSequence_i::from_any (const CORBA::Any & any)
{
CORBA::Any field_any;
TAO_InputCDR unk_in (cdr);
TAO::Unknown_IDL_Type *field_unk = 0;
TAO::Unknown_IDL_Type *field_unk {};
ACE_NEW (field_unk,
TAO::Unknown_IDL_Type (field_tc.in (),
unk_in));
Expand Down Expand Up @@ -614,12 +614,12 @@ TAO_DynSequence_i::to_any ()

TAO_InputCDR in_cdr (out_cdr);

CORBA::Any_ptr retval = 0;
CORBA::Any_ptr retval {};
ACE_NEW_THROW_EX (retval,
CORBA::Any,
CORBA::NO_MEMORY ());

TAO::Unknown_IDL_Type *unk = 0;
TAO::Unknown_IDL_Type *unk {};
ACE_NEW_THROW_EX (unk,
TAO::Unknown_IDL_Type (this->type_.in (),
in_cdr),
Expand Down
14 changes: 7 additions & 7 deletions TAO/tao/DynamicAny/DynStruct_i.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ TAO_DynStruct_i::set_from_any (const CORBA::Any & any)
TAO::Any_Impl *impl = any.impl ();
TAO_OutputCDR out;
TAO_InputCDR in (static_cast<ACE_Message_Block *> (0));
TAO::Unknown_IDL_Type *unk = 0;
TAO::Unknown_IDL_Type *unk {};

if (impl->encoded ())
{
Expand Down Expand Up @@ -439,7 +439,7 @@ TAO_DynStruct_i::from_any (const CORBA::Any & any)
TAO::Any_Impl *impl = any.impl ();
TAO_OutputCDR out;
TAO_InputCDR in (static_cast<ACE_Message_Block *> (0));
TAO::Unknown_IDL_Type *unk = 0;
TAO::Unknown_IDL_Type *unk {};

if (impl->encoded ())
{
Expand Down Expand Up @@ -477,7 +477,7 @@ TAO_DynStruct_i::from_any (const CORBA::Any & any)

CORBA::Any field_any;
TAO_InputCDR unk_in (in);
TAO::Unknown_IDL_Type *unk = 0;
TAO::Unknown_IDL_Type *unk {};
ACE_NEW (unk,
TAO::Unknown_IDL_Type (field_tc.in (),
unk_in));
Expand Down Expand Up @@ -521,8 +521,8 @@ TAO_DynStruct_i::to_any ()
out_cdr << this->type_->id ();
}

TAO::Any_Impl *field_impl = 0;
TAO::Unknown_IDL_Type *field_unk = 0;
TAO::Any_Impl *field_impl {};
TAO::Unknown_IDL_Type *field_unk {};
TAO_InputCDR field_in_cdr (static_cast<ACE_Message_Block *> (0));

for (CORBA::ULong i = 0; i < this->component_count_; ++i)
Expand Down Expand Up @@ -561,12 +561,12 @@ TAO_DynStruct_i::to_any ()

TAO_InputCDR in_cdr (out_cdr);

CORBA::Any_ptr retval = 0;
CORBA::Any_ptr retval {};
ACE_NEW_THROW_EX (retval,
CORBA::Any,
CORBA::NO_MEMORY ());

TAO::Unknown_IDL_Type *unk = 0;
TAO::Unknown_IDL_Type *unk {};
ACE_NEW_THROW_EX (unk,
TAO::Unknown_IDL_Type (this->type_.in (),
in_cdr),
Expand Down
4 changes: 2 additions & 2 deletions TAO/tao/DynamicAny/DynValueBox_i.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,11 @@ TAO_DynValueBox_i::to_any ()

// Convert the out_cdr into a new any.
TAO_InputCDR in_cdr (out_cdr);
TAO::Unknown_IDL_Type * unk = 0;
TAO::Unknown_IDL_Type * unk {};
ACE_NEW_THROW_EX (unk,
TAO::Unknown_IDL_Type (this->type_.in (), in_cdr),
CORBA::NO_MEMORY ());
CORBA::Any_ptr retval = 0;
CORBA::Any_ptr retval {};
ACE_NEW_THROW_EX (retval, CORBA::Any, CORBA::NO_MEMORY ());
retval->replace (unk);
return retval;
Expand Down
8 changes: 4 additions & 4 deletions TAO/tao/DynamicAny/DynValue_i.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ TAO_DynValue_i::get_val ()

// Now read in this stream to create the actual value.
TAO_InputCDR for_reading (out_cdr);
CORBA::ValueBase *retval = 0;
CORBA::ValueBase *retval {};
if (!CORBA::ValueBase::_tao_unmarshal (
for_reading, retval ))
{
Expand All @@ -590,12 +590,12 @@ TAO_DynValue_i::to_any ()

// Convert the out_cdr into a new any.
TAO_InputCDR in_cdr (out_cdr);
TAO::Unknown_IDL_Type *unk = 0;
TAO::Unknown_IDL_Type *unk {};
ACE_NEW_THROW_EX (
unk,
TAO::Unknown_IDL_Type (this->type_.in (), in_cdr),
CORBA::NO_MEMORY () );
CORBA::Any_ptr retval = 0;
CORBA::Any_ptr retval {};
ACE_NEW_THROW_EX (
retval,
CORBA::Any,
Expand Down Expand Up @@ -1113,7 +1113,7 @@ TAO_DynValue_i::from_inputCDR (TAO_InputCDR &strm)
{
// Need to create an any for this field.
TAO_InputCDR unk_in (strm);
TAO::Unknown_IDL_Type *unk= 0;
TAO::Unknown_IDL_Type *unk {};
ACE_NEW_THROW_EX (
unk,
TAO::Unknown_IDL_Type (field_tc.in (), unk_in),
Expand Down

0 comments on commit fa28588

Please sign in to comment.