diff options
Diffstat (limited to 'TAO/tao/AnyTypeCode/Sequence_TypeCode.cpp')
-rw-r--r-- | TAO/tao/AnyTypeCode/Sequence_TypeCode.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/TAO/tao/AnyTypeCode/Sequence_TypeCode.cpp b/TAO/tao/AnyTypeCode/Sequence_TypeCode.cpp index ba62129030b..9921f123ee5 100644 --- a/TAO/tao/AnyTypeCode/Sequence_TypeCode.cpp +++ b/TAO/tao/AnyTypeCode/Sequence_TypeCode.cpp @@ -9,6 +9,8 @@ # include "tao/AnyTypeCode/Sequence_TypeCode.inl" #endif /* !__ACE_INLINE__ */ +#include "ace/Truncate.h" + TAO_BEGIN_VERSIONED_NAMESPACE_DECL template <typename TypeCodeType, class RefCountPolicy> @@ -30,14 +32,16 @@ TAO::TypeCode::Sequence<TypeCodeType, RefCountPolicy>::tao_marshal ( // Aligning on an octet since the next value after the CDR // encapsulation length will always be the byte order octet/boolean // in this case. - offset = ACE_align_binary (offset + 4, - ACE_CDR::OCTET_ALIGN); + offset = ACE_Utils::truncate_cast<CORBA::ULong> ( + ACE_align_binary (offset + 4, + ACE_CDR::OCTET_ALIGN)); return enc << TAO_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER) && marshal (enc, Traits<TypeCodeType>::get_typecode (this->content_type_), - offset + enc.total_length ()) + ACE_Utils::truncate_cast<CORBA::ULong> ( + offset + enc.total_length ())) && enc << this->length_ && cdr << static_cast<CORBA::ULong> (enc.total_length ()) && cdr.write_octet_array_mb (enc.begin ()); |