summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2005-02-22 06:19:09 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2005-02-22 06:19:09 +0000
commit81b12928a65d902a647cca87f29db2bb37fb38a8 (patch)
treef27caaf94efd72e1074b11f5e117a2a35d1f701a
parent0889c04f6a798501322676d0e72b0db72f1645fc (diff)
downloadATCD-81b12928a65d902a647cca87f29db2bb37fb38a8.tar.gz
ChangeLogTag:Mon Feb 21 22:13:13 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
-rw-r--r--TAO/ChangeLog12
-rw-r--r--TAO/tao/DynamicInterface/DII_Invocation.inl3
-rw-r--r--TAO/tao/DynamicInterface/Request.cpp15
-rw-r--r--TAO/tao/DynamicInterface/Server_Request.cpp5
-rw-r--r--TAO/tao/DynamicInterface/Unknown_User_Exception.cpp12
-rw-r--r--TAO/tao/DynamicInterface/Unknown_User_Exception.h4
6 files changed, 30 insertions, 21 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 45ad026261c..f349c4996b2 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,15 @@
+Mon Feb 21 22:13:13 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * tao/DynamicInterface/Unknown_User_Exception.h (_downcast):
+ * tao/DynamicInterface/Unknown_User_Exception.cpp (_downcast):
+
+ Added missing const _downcast() static method. Required by the
+ C++ mapping.
+
+ Removed unnecessary/redundant repository ID check. The
+ standard C++ dynamic_cast<> already performs the required
+ downcasting checks.
+
Mon Feb 21 13:09:43 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
* tao/Exception.h:
diff --git a/TAO/tao/DynamicInterface/DII_Invocation.inl b/TAO/tao/DynamicInterface/DII_Invocation.inl
index 459a9ae00c8..39c6815d5fb 100644
--- a/TAO/tao/DynamicInterface/DII_Invocation.inl
+++ b/TAO/tao/DynamicInterface/DII_Invocation.inl
@@ -31,8 +31,7 @@ TAO_GIOP_DII_Deferred_Invocation::TAO_GIOP_DII_Deferred_Invocation (
)
: TAO_GIOP_Asynch_Invocation (stub,
req->operation (),
- ACE_static_cast (CORBA::ULong,
- ACE_OS::strlen (req->operation ())),
+ static_cast<CORBA::ULong> (ACE_OS::strlen (req->operation ())),
argument_flag,
orb_core,
byte_order)
diff --git a/TAO/tao/DynamicInterface/Request.cpp b/TAO/tao/DynamicInterface/Request.cpp
index d4202844162..1aa2e74cdbf 100644
--- a/TAO/tao/DynamicInterface/Request.cpp
+++ b/TAO/tao/DynamicInterface/Request.cpp
@@ -166,9 +166,8 @@ CORBA::Request::invoke (ACE_ENV_SINGLE_ARG_DECL)
this->target_,
_tao_arg_list,
number_args,
- ACE_const_cast (char *, this->opname_),
- ACE_static_cast (CORBA::ULong,
- ACE_OS::strlen (this->opname_)),
+ const_cast<char *> (this->opname_),
+ static_cast<CORBA::ULong> (ACE_OS::strlen (this->opname_)),
this->exceptions_.in (),
this);
@@ -212,9 +211,8 @@ CORBA::Request::send_oneway (ACE_ENV_SINGLE_ARG_DECL)
this->target_,
_tao_arg_list,
number_args,
- ACE_const_cast (char *, this->opname_),
- ACE_static_cast (CORBA::ULong,
- ACE_OS::strlen (this->opname_)),
+ const_cast<char *> (this->opname_),
+ static_cast<CORBA::ULong> (ACE_OS::strlen (this->opname_)),
0,
TAO::TAO_ONEWAY_INVOCATION);
@@ -258,9 +256,8 @@ CORBA::Request::send_deferred (ACE_ENV_SINGLE_ARG_DECL)
this->target_,
_tao_arg_list,
number_args,
- ACE_const_cast (char *, this->opname_),
- ACE_static_cast (CORBA::ULong,
- ACE_OS::strlen (this->opname_)),
+ const_cast<char *> (this->opname_),
+ static_cast<CORBA::ULong> (ACE_OS::strlen (this->opname_)),
0,
this->orb_->orb_core (),
this);
diff --git a/TAO/tao/DynamicInterface/Server_Request.cpp b/TAO/tao/DynamicInterface/Server_Request.cpp
index b8de495cfc7..4af2cafe296 100644
--- a/TAO/tao/DynamicInterface/Server_Request.cpp
+++ b/TAO/tao/DynamicInterface/Server_Request.cpp
@@ -223,9 +223,8 @@ CORBA::ServerRequest::gateway_exception_reply (ACE_CString &raw_exception)
// of bytes. The outgoing stream's byte order has already been matched
// to the original source of the reply.
this->orb_server_request_.outgoing ().write_octet_array (
- ACE_reinterpret_cast (const CORBA::Octet *, raw_exception.fast_rep ()),
- ACE_static_cast (CORBA::ULong,
- raw_exception.length () + ACE_CDR::MAX_ALIGNMENT)
+ reinterpret_cast<const CORBA::Octet *> (raw_exception.fast_rep ()),
+ static_cast<CORBA::ULong> (raw_exception.length () + ACE_CDR::MAX_ALIGNMENT)
);
// This will prevent the marshaling of any parameters into this reply.
diff --git a/TAO/tao/DynamicInterface/Unknown_User_Exception.cpp b/TAO/tao/DynamicInterface/Unknown_User_Exception.cpp
index e540116ac9d..e3784115833 100644
--- a/TAO/tao/DynamicInterface/Unknown_User_Exception.cpp
+++ b/TAO/tao/DynamicInterface/Unknown_User_Exception.cpp
@@ -65,13 +65,13 @@ CORBA::UnknownUserException::_is_a (const char *interface_id) const
CORBA::UnknownUserException *
CORBA::UnknownUserException::_downcast (CORBA::Exception *ex)
{
- if (ex->_is_a ("IDL:omg.org/CORBA/UnknownUserException:1.0"))
- {
- return ACE_dynamic_cast (CORBA::UnknownUserException *,
- ex);
- }
+ return dynamic_cast<CORBA::UnknownUserException *> (ex);
+}
- return 0;
+CORBA::UnknownUserException const *
+CORBA::UnknownUserException::_downcast (CORBA::Exception const * ex)
+{
+ return dynamic_cast<CORBA::UnknownUserException const *> (ex);
}
void
diff --git a/TAO/tao/DynamicInterface/Unknown_User_Exception.h b/TAO/tao/DynamicInterface/Unknown_User_Exception.h
index e80e61525f8..bd1d5fe494d 100644
--- a/TAO/tao/DynamicInterface/Unknown_User_Exception.h
+++ b/TAO/tao/DynamicInterface/Unknown_User_Exception.h
@@ -83,7 +83,9 @@ namespace CORBA
ACE_ENV_ARG_DECL);
/// Narrow to an UnknowUserException.
- static UnknownUserException *_downcast (CORBA::Exception *ex);
+ static UnknownUserException * _downcast (CORBA::Exception *ex);
+ static UnknownUserException const * _downcast (
+ CORBA::Exception const * ex);
// = TAO specific extension.