summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Corino <mcorino@remedy.nl>2015-06-01 11:29:42 +0200
committerMartin Corino <mcorino@remedy.nl>2015-06-01 11:29:42 +0200
commit7bc30b68770f26eb53e194c54f1e1e92ccd8fe43 (patch)
tree516b9cd6d3dfaf98f70b5951ea5d7c9162c9218f
parent98a76c8a801f3c9d35ebedca4de7bb18effdc888 (diff)
downloadATCD-7bc30b68770f26eb53e194c54f1e1e92ccd8fe43.tar.gz
Fix MSVC integer conversion warnings.
* TAO/tao/DynamicAny/DynValue_i.cpp:
-rw-r--r--TAO/tao/DynamicAny/DynValue_i.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/TAO/tao/DynamicAny/DynValue_i.cpp b/TAO/tao/DynamicAny/DynValue_i.cpp
index 6892ea759dc..7a58d303fb3 100644
--- a/TAO/tao/DynamicAny/DynValue_i.cpp
+++ b/TAO/tao/DynamicAny/DynValue_i.cpp
@@ -10,6 +10,8 @@
#include "tao/CDR.h"
#include "tao/Valuetype/ValueBase.h"
+#include "ace/Truncate.h"
+
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_DynValue_i::TAO_DynValue_i (CORBA::Boolean allow_truncation)
@@ -156,7 +158,7 @@ TAO_DynValue_i::get_correct_base_type (
// and so on until we reach the member we have asked for.
CORBA::ULong
- currentBase = base_types.size ();
+ currentBase = ACE_Utils::truncate_cast<CORBA::ULong> (base_types.size ());
if (!currentBase)
{
TAOLIB_DEBUG ((LM_DEBUG,
@@ -717,7 +719,8 @@ TAO_DynValue_i::to_outputCDR (TAO_OutputCDR &out_cdr)
TAO_OBV_GIOP_Flags::Value_tag_base |
TAO_OBV_GIOP_Flags::Type_info_single;
- const CORBA::ULong num_ids = this->da_base_types_.size ();
+ const CORBA::ULong num_ids =
+ ACE_Utils::truncate_cast<CORBA::ULong> (this->da_base_types_.size ());
CORBA::ULong trunc_ids;
for (trunc_ids= 0u; trunc_ids < num_ids - 1u; ++trunc_ids)
{
@@ -1106,7 +1109,7 @@ TAO_DynValue_i::from_inputCDR (TAO_InputCDR &strm)
// marks for each seporate base-type's state we pass).
CORBA::Boolean need_first = true;
CORBA::ULong
- currentBase= this->da_base_types_.size (),
+ currentBase = ACE_Utils::truncate_cast<CORBA::ULong> (this->da_base_types_.size ()),
currentBaseMember = 0u;
for (CORBA::ULong currentMember= 0u;
currentMember < num_fields;