fixed two warnings in WebSocket[Impl]

This commit is contained in:
Guenter Obiltschnig
2012-01-23 14:05:12 +00:00
parent 3ad9851a0e
commit 760573bc3a
2 changed files with 4 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
//
// WebSocket.cpp
//
// $Id: //poco/1.4/Net/src/WebSocket.cpp#3 $
// $Id: //poco/1.4/Net/src/WebSocket.cpp#4 $
//
// Library: Net
// Package: WebSocket
@@ -107,7 +107,7 @@ void WebSocket::shutdown(Poco::UInt16 statusCode, const std::string& statusMessa
Poco::BinaryWriter writer(ostr, Poco::BinaryWriter::NETWORK_BYTE_ORDER);
writer << statusCode;
writer.writeRaw(statusMessage);
sendFrame(buffer.begin(), ostr.charsWritten(), FRAME_FLAG_FIN | FRAME_OP_CLOSE);
sendFrame(buffer.begin(), static_cast<int>(ostr.charsWritten()), FRAME_FLAG_FIN | FRAME_OP_CLOSE);
}

View File

@@ -1,7 +1,7 @@
//
// WebSocketImpl.cpp
//
// $Id: //poco/1.4/Net/src/WebSocketImpl.cpp#1 $
// $Id: //poco/1.4/Net/src/WebSocketImpl.cpp#2 $
//
// Library: Net
// Package: WebSocket
@@ -110,7 +110,7 @@ int WebSocketImpl::sendBytes(const void* buffer, int length, int flags)
{
std::memcpy(frame.begin() + ostr.charsWritten(), buffer, length);
}
_pStreamSocketImpl->sendBytes(frame.begin(), length + ostr.charsWritten());
_pStreamSocketImpl->sendBytes(frame.begin(), length + static_cast<int>(ostr.charsWritten()));
return length;
}