Skip to content

Commit

Permalink
Merge pull request #2241 from DOCGroup/revert-2238-jwi-dynamicany
Browse files Browse the repository at this point in the history
Revert "Minor modernization of DynamicAny code"
  • Loading branch information
jwillemsen authored May 22, 2024
2 parents 7d0a183 + 8b34c8e commit 54c9bcd
Show file tree
Hide file tree
Showing 21 changed files with 436 additions and 560 deletions.
18 changes: 9 additions & 9 deletions TAO/tao/AnyTypeCode/Indirected_Type_TypeCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ void
TAO::TypeCode::Indirected_Type::set_recursive_tc (CORBA::TypeCode_ptr tc)
{
// link only once (should never happen that this is called twice but test anyway)
if (this->recursive_tc_ == nullptr)
if (this->recursive_tc_ == 0)
{
ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);

if (tc == nullptr) // should never happen
if (tc == 0) // should never happen
return;

// make sure we are the right kind
Expand Down Expand Up @@ -105,7 +105,7 @@ TAO::TypeCode::Indirected_Type::equivalent_i (
CORBA::TypeCode_ptr
TAO::TypeCode::Indirected_Type::get_compact_typecode_i () const
{
return this->recursive_tc_ ? this->recursive_tc_->get_compact_typecode () : nullptr;
return this->recursive_tc_ ? this->recursive_tc_->get_compact_typecode () : 0;
}

char const *
Expand All @@ -117,7 +117,7 @@ TAO::TypeCode::Indirected_Type::id_i () const
char const *
TAO::TypeCode::Indirected_Type::name_i () const
{
return this->recursive_tc_ ? this->recursive_tc_->name () : nullptr;
return this->recursive_tc_ ? this->recursive_tc_->name () : 0;
}

CORBA::ULong
Expand All @@ -130,14 +130,14 @@ char const *
TAO::TypeCode::Indirected_Type::member_name_i (
CORBA::ULong index) const
{
return this->recursive_tc_ ? this->recursive_tc_->member_name (index) : nullptr;
return this->recursive_tc_ ? this->recursive_tc_->member_name (index) : 0;
}

CORBA::TypeCode_ptr
TAO::TypeCode::Indirected_Type::member_type_i (
CORBA::ULong index) const
{
return this->recursive_tc_ ? this->recursive_tc_->member_type (index) : nullptr;
return this->recursive_tc_ ? this->recursive_tc_->member_type (index) : 0;
}

CORBA::Visibility
Expand All @@ -155,19 +155,19 @@ TAO::TypeCode::Indirected_Type::type_modifier_i () const
CORBA::TypeCode_ptr
TAO::TypeCode::Indirected_Type::concrete_base_type_i () const
{
return this->recursive_tc_ ? this->recursive_tc_->concrete_base_type () : nullptr;
return this->recursive_tc_ ? this->recursive_tc_->concrete_base_type () : 0;
}

CORBA::Any *
TAO::TypeCode::Indirected_Type::member_label_i (CORBA::ULong index) const
{
return this->recursive_tc_ ? this->recursive_tc_->member_label (index) : nullptr;
return this->recursive_tc_ ? this->recursive_tc_->member_label (index) : 0;
}

CORBA::TypeCode_ptr
TAO::TypeCode::Indirected_Type::discriminator_type_i () const
{
return this->recursive_tc_ ? this->recursive_tc_->discriminator_type () : nullptr;
return this->recursive_tc_ ? this->recursive_tc_->discriminator_type () : 0;
}

CORBA::Long
Expand Down
8 changes: 4 additions & 4 deletions TAO/tao/DynamicAny/DynAnyUtils_T.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace TAO
ANY_TC any_tc,
CORBA::Boolean allow_truncation)
{
DA_IMPL *p {};
DA_IMPL *p = 0;
ACE_NEW_THROW_EX (p,
DA_IMPL (allow_truncation),
CORBA::NO_MEMORY ());
Expand All @@ -128,7 +128,7 @@ namespace TAO
// Currently only TAO_DynValue_i can throw the original (duplicate
// of a previously found TAO_DynValue_i). The new BLANK one created
// above on which we called init() will be deleted automatically by
// the unique_ptr.
// the ACE_Auto_Basic_Ptr.
return original;
}

Expand All @@ -142,7 +142,7 @@ namespace TAO
ANY_TC any_tc,
CORBA::Boolean allow_truncation)
{
DA_IMPL *p {};
DA_IMPL *p = 0;
ACE_NEW_THROW_EX (p,
DA_IMPL (allow_truncation),
CORBA::NO_MEMORY ());
Expand All @@ -157,7 +157,7 @@ namespace TAO
// Currently only TAO_DynValue_i can throw the original (duplicate
// of a previously found TAO_DynValue_i). The new BLANK one created
// above on which we called init() will be deleted automatically by
// the unique_ptr.
// the ACE_Auto_Basic_Ptr.
return original;
}

Expand Down
Loading

0 comments on commit 54c9bcd

Please sign in to comment.