summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-10-17 00:40:33 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-10-17 00:40:33 +0000
commit34956626c23ae3dae470877eed3fc4c96b19fcf9 (patch)
treef2f7bedfde1cfe4002552d5599722b16dde22a96 /TAO
parent0f5e8ff1b24c69e848ed49975f656ee28d387b90 (diff)
downloadATCD-34956626c23ae3dae470877eed3fc4c96b19fcf9.tar.gz
.
Diffstat (limited to 'TAO')
-rw-r--r--TAO/tao/NVList.cpp13
-rw-r--r--TAO/tao/Object_Table.i65
-rw-r--r--TAO/tao/Operation_Table.cpp25
-rw-r--r--TAO/tao/POA.cpp9
4 files changed, 68 insertions, 44 deletions
diff --git a/TAO/tao/NVList.cpp b/TAO/tao/NVList.cpp
index ce05729f648..fb7b8b40fb6 100644
--- a/TAO/tao/NVList.cpp
+++ b/TAO/tao/NVList.cpp
@@ -128,8 +128,8 @@ CORBA_NVList::add_value (const char *name,
// the ORB, but rather that the ORB copies its value.
//
// Initialize the newly allocated memory using a copy
- // constructor that places the new "Any" value at just the right
- // place, and makes a "deep copy" of the data.
+ // constructor that places the new "Any" value at just the
+ // right place, and makes a "deep copy" of the data.
nv->any_ = value;
else
{
@@ -184,14 +184,13 @@ CORBA_NVList::add_value_consume (char * name,
// consume name
nv->name_ = name;
- // consume the value @@ (ASG) have we? we may need to destroy the in
- // parameter
+ // consume the value @@ (ASG) have we? we may need to destroy
+ // the in parameter
nv->any_ = *value;
return nv;
}
else
return 0;
-
}
//CORBA::Status
@@ -200,7 +199,6 @@ CORBA_NVList::remove (CORBA::ULong /*n*/, CORBA::Environment &/*env*/)
{
// not implemented
// @@ (ASG) - TODO
-
}
// Helper method
@@ -208,7 +206,8 @@ CORBA::NamedValue_ptr
CORBA_NVList::add_element (CORBA::Flags flags, CORBA::Environment &env)
{
env.clear ();
- if (ACE_BIT_DISABLED (flags, CORBA::ARG_IN | CORBA::ARG_OUT | CORBA::ARG_INOUT))
+ if (ACE_BIT_DISABLED (flags,
+ CORBA::ARG_IN | CORBA::ARG_OUT | CORBA::ARG_INOUT))
{
env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO));
return 0;
diff --git a/TAO/tao/Object_Table.i b/TAO/tao/Object_Table.i
index ac03b9deafb..891d696f868 100644
--- a/TAO/tao/Object_Table.i
+++ b/TAO/tao/Object_Table.i
@@ -37,9 +37,7 @@ TAO_Object_Table_Iterator::TAO_Object_Table_Iterator (const TAO_Object_Table_Ite
: impl_ (0)
{
if (x.impl_ != 0)
- {
- this->impl_ = x.impl_->clone ();
- }
+ this->impl_ = x.impl_->clone ();
}
ACE_INLINE TAO_Object_Table_Iterator &
@@ -49,13 +47,9 @@ TAO_Object_Table_Iterator::operator= (const TAO_Object_Table_Iterator &x)
{
delete this->impl_;
if (x.impl_ == 0)
- {
- this->impl_ = 0;
- }
+ this->impl_ = 0;
else
- {
- this->impl_ = x.impl_->clone ();
- }
+ this->impl_ = x.impl_->clone ();
}
return *this;
}
@@ -230,7 +224,12 @@ TAO_Dynamic_Hash_ObjTable::begin (void) const
{
TAO_Dynamic_Hash_ObjTable *non_const =
ACE_const_cast(TAO_Dynamic_Hash_ObjTable*, this);
- return new TAO_Dynamic_Hash_ObjTable_Iterator (Iterator (non_const->hash_map_));
+
+ TAO_Object_Table_Iterator_Impl *tmp;
+ ACE_NEW_RETURN (tmp,
+ TAO_Dynamic_Hash_ObjTable_Iterator (Iterator (non_const->hash_map_)),
+ 0);
+ return tmp;
}
ACE_INLINE TAO_Object_Table_Iterator_Impl *
@@ -242,20 +241,28 @@ TAO_Dynamic_Hash_ObjTable::end (void) const
ACE_INLINE TAO_Object_Table_Iterator_Impl*
TAO_Dynamic_Hash_ObjTable_Iterator::clone (void) const
{
- return new TAO_Dynamic_Hash_ObjTable_Iterator (*this);
+ TAO_Object_Table_Iterator_Impl *tmp;
+ ACE_NEW_RETURN (tmp,
+ TAO_Dynamic_Hash_ObjTable_Iterator (*this),
+ 0);
+ return tmp;
}
ACE_INLINE const TAO_Object_Table_Entry &
TAO_Dynamic_Hash_ObjTable_Iterator::item (void) const
{
TAO_Object_Table_Entry &entry =
- ACE_const_cast(TAO_Object_Table_Entry&, this->entry_);
+ ACE_const_cast (TAO_Object_Table_Entry &,
+ this->entry_);
ACE_Hash_Map_Entry<PortableServer::ObjectId,PortableServer::Servant> *tmp;
- if (ACE_const_cast(TAO_Dynamic_Hash_ObjTable_Iterator*,this)->impl_.next (tmp) == 1)
+
+ if (ACE_const_cast (TAO_Dynamic_Hash_ObjTable_Iterator*,
+ this)->impl_.next (tmp) == 1)
{
entry.servant_ = tmp->int_id_;
entry.id_ = tmp->ext_id_;
}
+
return entry;
}
@@ -280,7 +287,11 @@ TAO_Array_ObjTable_Iterator::TAO_Array_ObjTable_Iterator (TAO_Object_Table_Entry
ACE_INLINE TAO_Object_Table_Iterator_Impl *
TAO_Array_ObjTable_Iterator::clone (void) const
{
- return new TAO_Array_ObjTable_Iterator (*this);
+ TAO_Object_Table_Iterator_Impl *tmp;
+ ACE_NEW_RETURN (tmp,
+ TAO_Array_ObjTable_Iterator (*this),
+ 0);
+ return tmp;
}
ACE_INLINE const TAO_Object_Table_Entry &
@@ -292,21 +303,21 @@ TAO_Array_ObjTable_Iterator::item (void) const
ACE_INLINE void
TAO_Array_ObjTable_Iterator::advance (void)
{
- this->pos_++;
+ ++this->pos_;
}
ACE_INLINE int
TAO_Array_ObjTable_Iterator::done (const TAO_Object_Table_Iterator_Impl *end) const
{
const TAO_Array_ObjTable_Iterator *tmp =
- ACE_dynamic_cast(const TAO_Array_ObjTable_Iterator*, end);
- return (this->pos_ == tmp->pos_);
+ ACE_dynamic_cast (const TAO_Array_ObjTable_Iterator*, end);
+ return this->pos_ == tmp->pos_;
}
ACE_INLINE
TAO_Linear_ObjTable::~TAO_Linear_ObjTable (void)
{
- delete[] this->table_;
+ delete [] this->table_;
}
ACE_INLINE int
@@ -337,13 +348,21 @@ TAO_Linear_ObjTable::system_id_size (void) const
ACE_INLINE TAO_Object_Table_Iterator_Impl *
TAO_Linear_ObjTable::begin (void) const
{
- return new TAO_Array_ObjTable_Iterator (this->table_);
+ TAO_Object_Table_Iterator_Impl *tmp;
+ ACE_NEW_RETURN (tmp,
+ TAO_Array_ObjTable_Iterator (this->table_),
+ 0);
+ return tmp;
}
ACE_INLINE TAO_Object_Table_Iterator_Impl*
TAO_Linear_ObjTable::end (void) const
{
- return new TAO_Array_ObjTable_Iterator (this->table_ + this->next_);
+ TAO_Object_Table_Iterator_Impl *tmp;
+ ACE_NEW_RETURN (tmp,
+ TAO_Array_ObjTable_Iterator (this->table_ + this->next_),
+ 0);
+ return tmp;
}
ACE_INLINE
@@ -381,8 +400,10 @@ TAO_Active_Demux_ObjTable::parse_object_id (const PortableServer::ObjectId &id,
id.get_buffer (),
sizeof id_data);
- index = id_data[TAO_Active_Demux_ObjTable::INDEX_FIELD];
- generation = id_data[TAO_Active_Demux_ObjTable::GENERATION_FIELD];
+ index =
+ id_data[TAO_Active_Demux_ObjTable::INDEX_FIELD];
+ generation =
+ id_data[TAO_Active_Demux_ObjTable::GENERATION_FIELD];
return 0;
}
diff --git a/TAO/tao/Operation_Table.cpp b/TAO/tao/Operation_Table.cpp
index 1c05f79b323..90ba0b8592a 100644
--- a/TAO/tao/Operation_Table.cpp
+++ b/TAO/tao/Operation_Table.cpp
@@ -119,8 +119,12 @@ TAO_Active_Demux_OpTable::TAO_Active_Demux_OpTable (const
CORBA::ULong dbsize)
: next_ (0),
tablesize_ (dbsize),
- tbl_ (new TAO_Active_Demux_OpTable_Entry[dbsize])
+ tbl_ (0)
{
+
+ ACE_NEW (tbl_,
+ TAO_Active_Demux_OpTable_Entry[dbsize]);
+
// The job of the constructor is to go thru each entry of the
// database and bind the operation name to its corresponding
// skeleton.
@@ -185,10 +189,10 @@ TAO_Perfect_Hash_OpTable::~TAO_Perfect_Hash_OpTable (void)
{
}
-
// Uses <{opname}> to look up the skeleton function and pass it back
-// in <{skelfunc}>. Returns non-negative integer on success, or -1
-// on failure.
+// in <{skelfunc}>. Returns non-negative integer on success, or -1 on
+// failure.
+
int
TAO_Perfect_Hash_OpTable::find (const char *opname,
TAO_Skeleton &skelfunc)
@@ -225,20 +229,20 @@ TAO_Binary_Search_OpTable::~TAO_Binary_Search_OpTable (void)
{
}
-
// Uses <{opname}> to look up the skeleton function and pass it back
-// in <{skelfunc}>. Returns non-negative integer on success, or -1
-// on failure.
+// in <{skelfunc}>. Returns non-negative integer on success, or -1 on
+// failure.
+
int
TAO_Binary_Search_OpTable::find (const char *opname,
- TAO_Skeleton &skelfunc)
+ TAO_Skeleton &skelfunc)
{
const TAO_operation_db_entry *entry = lookup (opname);
+
if (entry == 0)
ACE_ERROR_RETURN ((LM_ERROR,
"TAO_Binary_Search_Table:find failed\n"),
-1);
-
// Valid entry. Figure out the skel_ptr.
skelfunc = entry->skel_ptr_;
@@ -302,7 +306,8 @@ TAO_Operation_Table_Factory::~TAO_Operation_Table_Factory (void)
TAO_Operation_Table *
TAO_Operation_Table_Factory::opname_lookup_strategy (void)
{
- TAO_Operation_Table_Parameters *p = TAO_OP_TABLE_PARAMETERS::instance ();
+ TAO_Operation_Table_Parameters *p =
+ TAO_OP_TABLE_PARAMETERS::instance ();
return p->concrete_strategy ();
}
diff --git a/TAO/tao/POA.cpp b/TAO/tao/POA.cpp
index 5d6086a94aa..0c386e897d3 100644
--- a/TAO/tao/POA.cpp
+++ b/TAO/tao/POA.cpp
@@ -2998,10 +2998,8 @@ TAO_POA::decode_string_to_sequence (TAO_Unbounded_Sequence<CORBA::Octet> &seq,
cp += 3;
}
else
- {
- // Copy it in
- seq[i] = *cp++;
- }
+ // Copy it in
+ seq[i] = *cp++;
}
// Set the length appropriately
@@ -3193,7 +3191,8 @@ TAO_POA_Manager::deactivate (CORBA::Boolean etherealize_objects,
// crisis (for example, unrecoverable error) situation.
for (POA_COLLECTION::iterator iterator = this->poa_collection_.begin ();
- iterator != this->poa_collection_.end () && env.exception () == 0;
+ iterator != this->poa_collection_.end ()
+ && env.exception () == 0;
++iterator)
{
TAO_POA *poa = *iterator;