Skip to content

Commit

Permalink
Use nullptr
Browse files Browse the repository at this point in the history
    * TAO/tao/AnyTypeCode/Indirected_Type_TypeCode.cpp:
    * TAO/tao/DynamicAny/DynAnyUtils_T.cpp:
    * TAO/tao/DynamicAny/DynValue_i.cpp:
  • Loading branch information
jwillemsen committed May 21, 2024
1 parent e585493 commit 1b273c1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 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_ == 0)
if (this->recursive_tc_ == nullptr)
{
ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);

if (tc == 0) // should never happen
if (tc == nullptr) // 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 () : 0;
return this->recursive_tc_ ? this->recursive_tc_->get_compact_typecode () : nullptr;
}

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 () : 0;
return this->recursive_tc_ ? this->recursive_tc_->name () : nullptr;
}

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) : 0;
return this->recursive_tc_ ? this->recursive_tc_->member_name (index) : nullptr;
}

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

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 () : 0;
return this->recursive_tc_ ? this->recursive_tc_->concrete_base_type () : nullptr;
}

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

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

CORBA::Long
Expand Down
4 changes: 2 additions & 2 deletions TAO/tao/DynamicAny/DynAnyUtils_T.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ACE_Auto_Basic_Ptr.
// the unique_ptr.
return original;
}

Expand Down Expand Up @@ -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 ACE_Auto_Basic_Ptr.
// the unique_ptr.
return original;
}

Expand Down
4 changes: 2 additions & 2 deletions TAO/tao/DynamicAny/DynValue_i.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ TAO_DynValue_i::init_helper (CORBA::TypeCode_ptr tc)
get_base_types (tc, this->da_base_types_, &this->component_count_);
this->da_members_.resize (this->component_count_);

// And initalize all of the DynCommon mix-in
// And initialize all of the DynCommon mix-in

this->init_common ();
}
Expand Down Expand Up @@ -1091,7 +1091,7 @@ TAO_DynValue_i::from_inputCDR (TAO_InputCDR &strm)
{
// This is recursive, keep reading from our inputCDR
// this allows for indirection
this->da_members_[currentMember]=
this->da_members_[currentMember] =
TAO::CreateDynAnyUtils<TAO_DynValue_i, TAO_InputCDR &>
::create_dyn_any_t (
field_tc.in (),
Expand Down

0 comments on commit 1b273c1

Please sign in to comment.