summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/TcpTransceiver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/TcpTransceiver.cpp')
-rw-r--r--cpp/src/Ice/TcpTransceiver.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/src/Ice/TcpTransceiver.cpp b/cpp/src/Ice/TcpTransceiver.cpp
index a7e51ae2dc5..69cfafa432a 100644
--- a/cpp/src/Ice/TcpTransceiver.cpp
+++ b/cpp/src/Ice/TcpTransceiver.cpp
@@ -78,8 +78,8 @@ IceInternal::TcpTransceiver::shutdownReadWrite()
void
IceInternal::TcpTransceiver::write(Buffer& buf, int timeout)
{
- Buffer::Container::difference_type packetSize =
- static_cast<Buffer::Container::difference_type>(buf.b.end() - buf.i);
+ // Its impossible for the packetSize to be more than an Int.
+ int packetSize = static_cast<int>(buf.b.end() - buf.i);
#ifdef _WIN32
//
@@ -185,7 +185,7 @@ IceInternal::TcpTransceiver::write(Buffer& buf, int timeout)
if(packetSize > buf.b.end() - buf.i)
{
- packetSize = static_cast<Buffer::Container::difference_type>(buf.b.end() - buf.i);
+ packetSize = static_cast<int>(buf.b.end() - buf.i);
}
}
}
@@ -193,8 +193,8 @@ IceInternal::TcpTransceiver::write(Buffer& buf, int timeout)
void
IceInternal::TcpTransceiver::read(Buffer& buf, int timeout)
{
- Buffer::Container::difference_type packetSize =
- static_cast<Buffer::Container::difference_type>(buf.b.end() - buf.i);
+ // Its impossible for the packetSize to be more than an Int.
+ int packetSize = static_cast<int>(buf.b.end() - buf.i);
while(buf.i != buf.b.end())
{
@@ -309,7 +309,7 @@ IceInternal::TcpTransceiver::read(Buffer& buf, int timeout)
if(packetSize > buf.b.end() - buf.i)
{
- packetSize = static_cast<Buffer::Container::difference_type>(buf.b.end() - buf.i);
+ packetSize = static_cast<int>(buf.b.end() - buf.i);
}
}
}