diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2007-02-26 23:48:49 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2007-02-26 23:48:49 +0000 |
commit | 72d25451e85add56fffe761eda70c26ddcc55caa (patch) | |
tree | f5d490eb403a6367ca34d39b065a8bceee3f4d0c /TAO/tao/AnyTypeCode/Any_Impl_T.cpp | |
parent | 2a922cde379d5f974e40111f6dff6fa7921dc3c1 (diff) | |
download | ATCD-72d25451e85add56fffe761eda70c26ddcc55caa.tar.gz |
ChangeLogTag:Mon Feb 26 23:27:03 UTC 2007 Ossama Othman <ossama_othman at symantec dot com>
Diffstat (limited to 'TAO/tao/AnyTypeCode/Any_Impl_T.cpp')
-rw-r--r-- | TAO/tao/AnyTypeCode/Any_Impl_T.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/TAO/tao/AnyTypeCode/Any_Impl_T.cpp b/TAO/tao/AnyTypeCode/Any_Impl_T.cpp index 332298de8c1..b6ac3bd2724 100644 --- a/TAO/tao/AnyTypeCode/Any_Impl_T.cpp +++ b/TAO/tao/AnyTypeCode/Any_Impl_T.cpp @@ -61,18 +61,18 @@ TAO::Any_Impl_T<T>::extract (const CORBA::Any & any, try { CORBA::TypeCode_ptr any_tc = any._tao_get_typecode (); - CORBA::Boolean _tao_equiv = any_tc->equivalent (tc); + CORBA::Boolean const _tao_equiv = any_tc->equivalent (tc); if (_tao_equiv == 0) { return false; } - TAO::Any_Impl *impl = any.impl (); + TAO::Any_Impl * const impl = any.impl (); - if (!impl->encoded ()) + if (impl && !impl->encoded ()) { - TAO::Any_Impl_T<T> *narrow_impl = + TAO::Any_Impl_T<T> * const narrow_impl = dynamic_cast <TAO::Any_Impl_T<T> *> (impl); if (narrow_impl == 0) @@ -94,9 +94,12 @@ TAO::Any_Impl_T<T>::extract (const CORBA::Any & any, auto_ptr<TAO::Any_Impl_T<T> > replacement_safety (replacement); // We know this will work since the unencoded case is covered above. - TAO::Unknown_IDL_Type *unk = + TAO::Unknown_IDL_Type * const unk = dynamic_cast<TAO::Unknown_IDL_Type *> (impl); + if (!unk) + return false; + // We don't want the rd_ptr of unk to move, in case it is // shared by another Any. This copies the state, not the buffer. TAO_InputCDR for_reading (unk->_tao_get_cdr ()); @@ -126,14 +129,14 @@ template<typename T> CORBA::Boolean TAO::Any_Impl_T<T>::to_object (CORBA::Object_ptr &) const { - return 0; + return false; } template<typename T> CORBA::Boolean TAO::Any_Impl_T<T>::to_value (CORBA::ValueBase *&) const { - return 0; + return false; } template<typename T> @@ -141,7 +144,7 @@ template<typename T> CORBA::Boolean TAO::Any_Impl_T<T>::to_abstract_base (CORBA::AbstractBase_ptr &) const { - return 0; + return false; } template<typename T> |