diff options
author | Martin Corino <mcorino@remedy.nl> | 2015-06-01 09:30:38 +0200 |
---|---|---|
committer | Martin Corino <mcorino@remedy.nl> | 2015-06-01 09:30:38 +0200 |
commit | ba64a124f699c1e6d2125c619480c8a40c4683aa (patch) | |
tree | 19d45f716fb84f44ce13ddaf3a85e53509f2cc2d /TAO/tao/AnyTypeCode/Sequence_TypeCode.cpp | |
parent | e23c3772c686b0b4af2eb0b7af622c7075b4b4df (diff) | |
download | ATCD-ba64a124f699c1e6d2125c619480c8a40c4683aa.tar.gz |
Fixing MSVC integer conversion warnings.
* TAO/tao/AnyTypeCode/Alias_TypeCode.cpp:
* TAO/tao/AnyTypeCode/Alias_TypeCode_Static.cpp:
* TAO/tao/AnyTypeCode/Sequence_TypeCode.cpp:
* TAO/tao/AnyTypeCode/Sequence_TypeCode_Static.cpp:
* TAO/tao/AnyTypeCode/Struct_TypeCode.cpp:
* TAO/tao/AnyTypeCode/Struct_TypeCode_Static.cpp:
* TAO/tao/AnyTypeCode/TypeCode_Case_Base_T.inl:
* TAO/tao/AnyTypeCode/Union_TypeCode.cpp:
* TAO/tao/AnyTypeCode/Union_TypeCode_Static.cpp:
* TAO/tao/AnyTypeCode/Value_TypeCode.cpp:
* TAO/tao/AnyTypeCode/Value_TypeCode_Static.cpp:
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 ()); |