summaryrefslogtreecommitdiff
path: root/TAO/tao/PortableServer/Key_Adapters.cpp
diff options
context:
space:
mode:
authorelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-30 12:31:02 +0000
committerelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-30 12:31:02 +0000
commitfdf973a1e9561a5b04b53ccb4f98e929f9e9a3c6 (patch)
tree0918899fe823d8adb5a86c5db91f4bf8e43a1086 /TAO/tao/PortableServer/Key_Adapters.cpp
parent52728a087e8dc453923745ad5d85bb1e15c1ce25 (diff)
downloadATCD-fdf973a1e9561a5b04b53ccb4f98e929f9e9a3c6.tar.gz
ChangeLogTag: Wed Apr 30 07:26:37 2003 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/tao/PortableServer/Key_Adapters.cpp')
-rw-r--r--TAO/tao/PortableServer/Key_Adapters.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/TAO/tao/PortableServer/Key_Adapters.cpp b/TAO/tao/PortableServer/Key_Adapters.cpp
index 2400e3405c6..1cae96bc389 100644
--- a/TAO/tao/PortableServer/Key_Adapters.cpp
+++ b/TAO/tao/PortableServer/Key_Adapters.cpp
@@ -50,7 +50,7 @@ TAO_Ignore_Original_Key_Adapter::encode (const PortableServer::ObjectId &origina
size_t active_key_size = active_key.size ();
// Resize to accommodate both the original data and the new active key.
- modified_key.length (active_key_size);
+ modified_key.length (ACE_static_cast (CORBA::ULong, active_key_size));
// Copy active key data into user key.
active_key.encode (modified_key.get_buffer ());
@@ -96,7 +96,9 @@ TAO_Preserve_Original_Key_Adapter::encode (const PortableServer::ObjectId &origi
size_t active_key_size = active_key.size ();
// Resize to accommodate both the original data and the new active key.
- modified_key.length (active_key_size + original_key.length ());
+ modified_key.length (ACE_static_cast (CORBA::ULong,
+ active_key_size)
+ + original_key.length ());
// Copy active key data into user key.
active_key.encode (modified_key.get_buffer ());
@@ -129,8 +131,10 @@ TAO_Preserve_Original_Key_Adapter::decode (const PortableServer::ObjectId &modif
size_t active_key_size = ACE_Active_Map_Manager_Key::size ();
// Smartly copy all the data; <original_key does not own the data>.
- original_key.replace (modified_key.maximum () - active_key_size,
- modified_key.length () - active_key_size,
+ original_key.replace (ACE_static_cast (CORBA::ULong,
+ modified_key.maximum () - active_key_size),
+ ACE_static_cast (CORBA::ULong,
+ modified_key.length () - active_key_size),
ACE_const_cast (CORBA::Octet *,
modified_key.get_buffer ()) + active_key_size,
0);