From 29ca1e763f32aff69dd1f7591503f430ce0fa3df Mon Sep 17 00:00:00 2001 From: Daviw Williams Date: Wed, 2 Oct 2013 15:09:55 +0200 Subject: [PATCH] Renamed functions to avoid confusion. --- .../include/PolyVoxCore/MinizBlockCompressor.h | 4 ++-- .../include/PolyVoxCore/MinizBlockCompressor.inl | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/MinizBlockCompressor.h b/library/PolyVoxCore/include/PolyVoxCore/MinizBlockCompressor.h index dafcfc7e..577cf782 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/MinizBlockCompressor.h +++ b/library/PolyVoxCore/include/PolyVoxCore/MinizBlockCompressor.h @@ -45,8 +45,8 @@ namespace PolyVox private: uint32_t getMaxCompressedSize(uint32_t uUncompressedInputSize); - uint32_t compress(const void* pSrcData, uint32_t uSrcLength, void* pDstData, uint32_t uDstLength); - uint32_t decompress(const void* pSrcData, uint32_t uSrcLength, void* pDstData, uint32_t uDstLength); + uint32_t compressWithMiniz(const void* pSrcData, uint32_t uSrcLength, void* pDstData, uint32_t uDstLength); + uint32_t decompressWithMiniz(const void* pSrcData, uint32_t uSrcLength, void* pDstData, uint32_t uDstLength); unsigned int m_uCompressionFlags; diff --git a/library/PolyVoxCore/include/PolyVoxCore/MinizBlockCompressor.inl b/library/PolyVoxCore/include/PolyVoxCore/MinizBlockCompressor.inl index 49ae7b74..cf3ff800 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/MinizBlockCompressor.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/MinizBlockCompressor.inl @@ -80,7 +80,7 @@ namespace PolyVox try { // Perform the compression - uCompressedLength = compress(pSrcData, uSrcLength, pDstData, uDstLength); + uCompressedLength = compressWithMiniz(pSrcData, uSrcLength, pDstData, uDstLength); // Copy the resulting compressed data into the compressed block pDstBlock->setData(pDstData, uCompressedLength); @@ -101,7 +101,7 @@ namespace PolyVox try { // Perform the compression - uCompressedLength = compress(pSrcData, uSrcLength, pDstData, uDstLength); + uCompressedLength = compressWithMiniz(pSrcData, uSrcLength, pDstData, uDstLength); // Copy the resulting compressed data into the compressed block pDstBlock->setData(pDstData, uCompressedLength); @@ -128,7 +128,7 @@ namespace PolyVox //RLECompressor compressor; - uint32_t uUncompressedLength = decompress(pSrcData, uSrcLength, pDstData, uDstLength); + uint32_t uUncompressedLength = decompressWithMiniz(pSrcData, uSrcLength, pDstData, uDstLength); POLYVOX_ASSERT(uUncompressedLength == pDstBlock->getDataSizeInBytes(), "Destination length has changed."); } @@ -145,7 +145,7 @@ namespace PolyVox } template - uint32_t MinizBlockCompressor::compress(const void* pSrcData, size_t uSrcLength, void* pDstData, size_t uDstLength) + uint32_t MinizBlockCompressor::compressWithMiniz(const void* pSrcData, size_t uSrcLength, void* pDstData, size_t uDstLength) { // Compress as much of the input as possible (or all of it) to the output buffer. tdefl_status status = tdefl_compress(m_pDeflator, pSrcData, &uSrcLength, pDstData, &uDstLength, TDEFL_FINISH); @@ -163,7 +163,7 @@ namespace PolyVox } template - uint32_t MinizBlockCompressor::decompress(const void* pSrcData, uint32_t uSrcLength, void* pDstData, uint32_t uDstLength) + uint32_t MinizBlockCompressor::decompressWithMiniz(const void* pSrcData, uint32_t uSrcLength, void* pDstData, uint32_t uDstLength) { // I don't know exactly why this limitation exists but it's an implementation detail of miniz. It shouldn't matter for our purposes // as our detination is a Block and those are always a power of two. If you need to use this class for other purposes then you'll