diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2017-12-01 15:21:59 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2017-12-01 15:21:59 +0100 |
commit | 086572d4d184bf23d916b35b006e1092b16c25fe (patch) | |
tree | effe53dfb3eab18963785301b6e772df9cb05432 /TAO/tao | |
parent | e9778ea7d1d3bb7baab3403f0c0e3802df209250 (diff) | |
download | ATCD-086572d4d184bf23d916b35b006e1092b16c25fe.tar.gz |
Make copy/assignment operators private and don't implement them, they are not used. Extended constructor so that operation table pointer can be passed directly with the constructor
* TAO/tao/PortableServer/Servant_Base.cpp:
* TAO/tao/PortableServer/Servant_Base.h:
Diffstat (limited to 'TAO/tao')
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.cpp | 18 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.h | 15 |
2 files changed, 10 insertions, 23 deletions
diff --git a/TAO/tao/PortableServer/Servant_Base.cpp b/TAO/tao/PortableServer/Servant_Base.cpp index 887154ad4bf..168697e5179 100644 --- a/TAO/tao/PortableServer/Servant_Base.cpp +++ b/TAO/tao/PortableServer/Servant_Base.cpp @@ -57,27 +57,13 @@ ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_ServantBase_Timeprobe_Description, TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_ServantBase::TAO_ServantBase (void) +TAO_ServantBase::TAO_ServantBase (TAO_Operation_Table* optable) : TAO_Abstract_ServantBase () , ref_count_ (1) - , optable_ (0) + , optable_ (optable) { } -TAO_ServantBase::TAO_ServantBase (const TAO_ServantBase &rhs) - : TAO_Abstract_ServantBase () - , ref_count_ (1) - , optable_ (rhs.optable_) -{ -} - -TAO_ServantBase & -TAO_ServantBase::operator= (const TAO_ServantBase &rhs) -{ - this->optable_ = rhs.optable_; - return *this; -} - TAO_ServantBase::~TAO_ServantBase (void) { } diff --git a/TAO/tao/PortableServer/Servant_Base.h b/TAO/tao/PortableServer/Servant_Base.h index e4cd6a1b48b..fbb04fd026a 100644 --- a/TAO/tao/PortableServer/Servant_Base.h +++ b/TAO/tao/PortableServer/Servant_Base.h @@ -185,13 +185,7 @@ public: protected: /// Default constructor, only derived classes can be created. - TAO_ServantBase (void); - - /// Copy constructor, protected so no instances can be created. - TAO_ServantBase (const TAO_ServantBase &); - - /// Assignment operator. - TAO_ServantBase &operator= (const TAO_ServantBase &); + explicit TAO_ServantBase (TAO_Operation_Table* optable = 0); void synchronous_upcall_dispatch ( TAO_ServerRequest & req, @@ -203,6 +197,13 @@ protected: TAO::Portable_Server::Servant_Upcall* servant_upcall, TAO_ServantBase *derived_this); +private: + /// Copy constructor, private so no instances can be created. + TAO_ServantBase (const TAO_ServantBase &); + + /// Assignment operator. + TAO_ServantBase &operator= (const TAO_ServantBase &); + protected: /// Reference counter. ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> ref_count_; |