Core/Misc: Remove some calls to const_cast

This commit is contained in:
Spp committed 2013-01-30 08:39:06 +01:00
1 parent 0281497573
commit fa5dd4bd4e
15 files changed
+43 -40

No files matched your search

+2 -2
View File
@@ -976,7 +976,7 @@ void WorldSession::HandleUpdateAccountData(WorldPacket& recvData)
dest.resize(decompressedSize);
uLongf realSize = decompressedSize;
if (uncompress(const_cast<uint8*>(dest.contents()), &realSize, const_cast<uint8*>(recvData.contents() + recvData.rpos()), recvData.size() - recvData.rpos()) != Z_OK)
if (uncompress(dest.contents(), &realSize, recvData.contents() + recvData.rpos(), recvData.size() - recvData.rpos()) != Z_OK)
{
recvData.rfinish(); // unnneded warning spam in this case
sLog->outError(LOG_FILTER_NETWORKIO, "UAD: Failed to decompress account data");
@@ -1017,7 +1017,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recvData)
ByteBuffer dest;
dest.resize(destSize);
if (size && compress(const_cast<uint8*>(dest.contents()), &destSize, (uint8*)adata->Data.c_str(), size) != Z_OK)
if (size && compress(dest.contents(), &destSize, (uint8 const*)adata->Data.c_str(), size) != Z_OK)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "RAD: Failed to compress account data");
return;