Fixing gcc problem with EncodeToBuf-function.

This commit is contained in:
lotodore
2013-09-15 23:11:15 +02:00
parent 36eeaee5d7
commit 84b9b56d6a
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -105,12 +105,12 @@ AsioSendBuffer::InternalStorePacket(boost::shared_ptr<SessionData> session, boos
google::protobuf::uint8 *buf = new google::protobuf::uint8[packetSize + NET_HEADER_SIZE];
*((uint32_t *)buf) = htonl(packetSize);
packet->GetMsg()->SerializeWithCachedSizesToArray(&buf[NET_HEADER_SIZE]);
EncodeToBuf(session, buf, packetSize + NET_HEADER_SIZE);
EncodeToBuf(buf, packetSize + NET_HEADER_SIZE);
delete[] buf;
}
int
AsioSendBuffer::EncodeToBuf(boost::shared_ptr<SessionData> /*session*/, const void *data, size_t size)
AsioSendBuffer::EncodeToBuf(const void *data, size_t size)
{
// Realloc buffer if necessary.
while (GetSendBufLeft() < size) {