Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tao / Base_Transport_Property.cpp
blobdd0eccfab29a040d6b7a437e5cc7a040e4d8632c
1 #include "tao/Base_Transport_Property.h"
2 #include "ace/OS_Memory.h"
4 #if !defined (__ACE_INLINE__)
5 # include "tao/Base_Transport_Property.inl"
6 #endif /* __ACE_INLINE__ */
8 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
10 TAO_Transport_Descriptor_Interface *
11 TAO_Base_Transport_Property::duplicate ()
13 // Get a copy of the underlying endpoint
14 TAO_Endpoint *const endpt = this->endpoint_->duplicate ();
15 if (endpt == nullptr)
16 return nullptr;
18 // Construct a copy of our class
19 TAO_Base_Transport_Property *prop = nullptr;
20 ACE_NEW_RETURN (prop, TAO_Base_Transport_Property (endpt, true), nullptr);
21 return prop;
25 CORBA::Boolean
26 TAO_Base_Transport_Property::is_equivalent
27 (const TAO_Transport_Descriptor_Interface *rhs)
29 const TAO_Base_Transport_Property *other_desc =
30 dynamic_cast<const TAO_Base_Transport_Property *> (rhs);
32 if (other_desc == nullptr)
33 return false;
35 return this->endpoint_->is_equivalent (other_desc->endpoint_);
39 u_long
40 TAO_Base_Transport_Property::hash () const
42 return this->endpoint_->hash ();
45 TAO_END_VERSIONED_NAMESPACE_DECL