From ad5013abb62230eda64c49b7ce38557e5f4b2de5 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 6 Feb 2007 16:34:57 +0000 Subject: Tue Feb 6 16:33:14 UTC 2007 Johnny Willemsen --- TAO/tao/Valuetype/AbstractBase.cpp | 5 +---- TAO/tao/Valuetype/ValueBase.cpp | 14 +++++--------- TAO/tao/Valuetype/ValueFactory.cpp | 2 +- TAO/tao/Valuetype/ValueFactory_Map.cpp | 7 +++---- 4 files changed, 10 insertions(+), 18 deletions(-) (limited to 'TAO/tao/Valuetype') diff --git a/TAO/tao/Valuetype/AbstractBase.cpp b/TAO/tao/Valuetype/AbstractBase.cpp index 9d64485d221..d0359c951a5 100644 --- a/TAO/tao/Valuetype/AbstractBase.cpp +++ b/TAO/tao/Valuetype/AbstractBase.cpp @@ -179,10 +179,7 @@ CORBA::AbstractBase::_is_a (const char *type_id) return this->equivalent_obj_->_is_a (type_id); } - int const cmp = ACE_OS::strcmp (type_id, - "IDL:omg.org/CORBA/AbstractBase:1.0"); - - return (cmp == 0); + return (ACE_OS::strcmp (type_id, "IDL:omg.org/CORBA/AbstractBase:1.0") == 0); } const char * diff --git a/TAO/tao/Valuetype/ValueBase.cpp b/TAO/tao/Valuetype/ValueBase.cpp index c6f9b5e9668..e701faa9749 100644 --- a/TAO/tao/Valuetype/ValueBase.cpp +++ b/TAO/tao/Valuetype/ValueBase.cpp @@ -170,9 +170,7 @@ CORBA::ValueBase::_tao_unmarshal (TAO_InputCDR &strm, // new_object->_tao_unmarshal_post () CORBA::Boolean const retval = - CORBA::ValueBase::_tao_unmarshal_pre (strm, - new_object, - 0); + CORBA::ValueBase::_tao_unmarshal_pre (strm, new_object, 0); if (!retval) { @@ -687,7 +685,7 @@ TAO_ChunkInfo::handle_chunking (TAO_InputCDR &strm) //that has parents. if (the_rd_ptr < this->chunk_octets_end_pos_) { - this->value_nesting_level_ ++; + ++this->value_nesting_level_; return true; } @@ -721,8 +719,7 @@ TAO_ChunkInfo::handle_chunking (TAO_InputCDR &strm) } this->value_nesting_level_ = - tag; - this->value_nesting_level_--; - + --this->value_nesting_level_; this->chunk_octets_end_pos_ = 0; @@ -737,7 +734,7 @@ TAO_ChunkInfo::handle_chunking (TAO_InputCDR &strm) { // Read the chunk size of another chunk. this->chunk_octets_end_pos_ = strm.rd_ptr () + tag; - this->value_nesting_level_ ++; + ++this->value_nesting_level_; } else // (tag >= 0x7fffff00) { @@ -1004,8 +1001,7 @@ CORBA::Boolean operator>> (TAO_InputCDR &strm, CORBA::ValueBase *&_tao_valuetype) { - return CORBA::ValueBase::_tao_unmarshal (strm, - _tao_valuetype); + return CORBA::ValueBase::_tao_unmarshal (strm, _tao_valuetype); } // =============== Template Specializations ===================== diff --git a/TAO/tao/Valuetype/ValueFactory.cpp b/TAO/tao/Valuetype/ValueFactory.cpp index 473780b8790..a03b7be5bc7 100644 --- a/TAO/tao/Valuetype/ValueFactory.cpp +++ b/TAO/tao/Valuetype/ValueFactory.cpp @@ -47,7 +47,7 @@ CORBA::ValueFactoryBase::_add_ref (void) void CORBA::ValueFactoryBase::_remove_ref (void) { - const CORBA::ULong new_count = --this->_tao_reference_count_; + CORBA::ULong const new_count = --this->_tao_reference_count_; if (new_count == 0) delete this; diff --git a/TAO/tao/Valuetype/ValueFactory_Map.cpp b/TAO/tao/Valuetype/ValueFactory_Map.cpp index f33af298e5e..9100f319cf8 100644 --- a/TAO/tao/Valuetype/ValueFactory_Map.cpp +++ b/TAO/tao/Valuetype/ValueFactory_Map.cpp @@ -69,8 +69,8 @@ TAO_ValueFactory_Map::unbind (const char *repo_id, ACE_GUARD_RETURN(TAO_SYNCH_MUTEX, guard, this->mutex_, -1); FACTORY_MAP_MANAGER::ENTRY *prev_entry = 0; - int ret = this->map_.find (repo_id, - prev_entry); + int ret = this->map_.find (repo_id, prev_entry); + if (ret == 0) // there was a matching factory { // set factory to the previous factory, @@ -94,8 +94,7 @@ TAO_ValueFactory_Map::find (const char *repo_id, { ACE_GUARD_RETURN(TAO_SYNCH_MUTEX, guard, this->mutex_, -1); - int const ret = this->map_.find (repo_id, - factory); + int const ret = this->map_.find (repo_id, factory); if (ret > -1) { factory->_add_ref (); // The caller gets one reference as gift. -- cgit v1.2.1