diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-07 16:47:37 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-12-07 16:47:37 +0100 |
commit | 7d210e952de2ccfd2ac758dbacd7b752da8769e9 (patch) | |
tree | 0e970def70c96a3c19d5f0d37cd17d678f70c9a0 /TAO/tao/Environment.cpp | |
parent | 884dcea8b196f72cb995de9f46d61a6ee6521222 (diff) | |
download | ATCD-7d210e952de2ccfd2ac758dbacd7b752da8769e9.tar.gz |
Removed redundant void, use nullptr/override in the TAO core
Diffstat (limited to 'TAO/tao/Environment.cpp')
-rw-r--r-- | TAO/tao/Environment.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/TAO/tao/Environment.cpp b/TAO/tao/Environment.cpp index 5f4cb9a9d53..779bea6f483 100644 --- a/TAO/tao/Environment.cpp +++ b/TAO/tao/Environment.cpp @@ -11,22 +11,22 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -CORBA::Environment::Environment (void) - : exception_ (0) - , previous_ (0) +CORBA::Environment::Environment () + : exception_ (nullptr) + , previous_ (nullptr) { } CORBA::Environment::Environment (const CORBA::Environment& rhs) - : exception_ (0) - , previous_ (0) + : exception_ (nullptr) + , previous_ (nullptr) { if (rhs.exception_) this->exception_ = rhs.exception_->_tao_duplicate (); } CORBA::Environment::Environment (TAO_ORB_Core* orb_core) - : exception_ (0) + : exception_ (nullptr) , previous_ (orb_core->default_environment ()) { orb_core->default_environment (this); @@ -49,14 +49,14 @@ CORBA::Environment::operator= (const CORBA::Environment& rhs) return *this; } -CORBA::Environment::~Environment (void) +CORBA::Environment::~Environment () { this->clear (); // If previous is 0 then this is the first Environment, allocated // with the ORB, it shouldn't try to pop because the ORB is being // destroyed also. - if (this->previous_ != 0) + if (this->previous_ != nullptr) TAO_ORB_Core_instance ()->default_environment (this->previous_); } @@ -84,15 +84,15 @@ CORBA::Environment::exception (CORBA::Exception *ex) this->exception_ = ex; - if (this->exception_ != 0) + if (this->exception_ != nullptr) this->exception_->_raise (); } void -CORBA::Environment::clear (void) +CORBA::Environment::clear () { delete this->exception_; - this->exception_ = 0; + this->exception_ = nullptr; } CORBA::Environment& @@ -118,7 +118,7 @@ CORBA::Environment::default_environment () // Convenience -- say if the exception is a system exception or not. int -CORBA::Environment::exception_type (void) const +CORBA::Environment::exception_type () const { // @@ Carlos, is this stuff that's properly "transformed" for EBCDIC // platforms?! @@ -156,10 +156,10 @@ CORBA::Environment::exception_type (void) const } const char* -CORBA::Environment::exception_id (void) const +CORBA::Environment::exception_id () const { - if (this->exception_ == 0) - return 0; + if (this->exception_ == nullptr) + return nullptr; return this->exception_->_rep_id (); } @@ -182,7 +182,7 @@ CORBA::Environment::print_exception (const char *info, CORBA::SystemException *x2 = CORBA::SystemException::_downcast (this->exception_); - if (x2 != 0) + if (x2 != nullptr) x2->_tao_print_system_exception (); else // @@ we can use the exception's typecode to dump all the data |