From f70498e806afc281d131207f861466da0dd9b9e5 Mon Sep 17 00:00:00 2001 From: Daviw Williams Date: Mon, 25 Feb 2013 16:34:21 +0100 Subject: [PATCH] Removed old code. --- .../PolyVoxCore/source/MinizCompressor.cpp | 34 ------------------- tests/testvolume.cpp | 8 ++--- tests/testvolume.h | 4 +-- 3 files changed, 6 insertions(+), 40 deletions(-) diff --git a/library/PolyVoxCore/source/MinizCompressor.cpp b/library/PolyVoxCore/source/MinizCompressor.cpp index 7e7032a9..3b5b177e 100644 --- a/library/PolyVoxCore/source/MinizCompressor.cpp +++ b/library/PolyVoxCore/source/MinizCompressor.cpp @@ -55,24 +55,6 @@ namespace PolyVox return MZ_MAX(128 + (source_len * 110) / 100, 128 + source_len + ((source_len / (31 * 1024)) + 1) * 5); } - // The commented out function is left here for reference and debugging purposes. - /*uint32_t MinizCompressor::compress(void* pSrcData, uint32_t uSrcLength, void* pDstData, uint32_t uDstLength) - { - mz_ulong ulDstLength = uDstLength; - - // Do the compression - int result = mz_compress((unsigned char*)pDstData, &ulDstLength, (const unsigned char*) pSrcData, uSrcLength); - if(result != MZ_OK) - { - stringstream ss; - ss << "mz_compress() failed with return code '" << result << "'"; - POLYVOX_THROW(std::runtime_error, ss.str()); - } - - // Return the number of bytes written to the output. - return ulDstLength; - }*/ - // The behaviour of this function should be the same as the commented out version above (except that it requires the destination to be a power of two), // but it's implemented using the lower level API which does not conflict with zlib or perform any memory allocations. uint32_t MinizCompressor::compress(void* pSrcData, uint32_t uSrcLength, void* pDstData, uint32_t uDstLength) @@ -102,22 +84,6 @@ namespace PolyVox return ulDstLength; } - // The commented out function is left here for reference and debugging purposes. - /*uint32_t MinizCompressor::decompress(void* pSrcData, uint32_t uSrcLength, void* pDstData, uint32_t uDstLength) - { - mz_ulong ulDstLength = uDstLength; - - int result = mz_uncompress((unsigned char*) pDstData, &ulDstLength, (const unsigned char*) pSrcData, uSrcLength); - if(result != MZ_OK) - { - stringstream ss; - ss << "mz_uncompress() failed with return code '" << result << "'"; - POLYVOX_THROW(std::runtime_error, ss.str()); - } - - return ulDstLength; - }*/ - // The behaviour of this function should be the same as the commented out version above (except that it requires the destination to be a power of two), // but it's implemented using the lower level API which does not conflict with zlib or perform any memory allocations. uint32_t MinizCompressor::decompress(void* pSrcData, uint32_t uSrcLength, void* pDstData, uint32_t uDstLength) diff --git a/tests/testvolume.cpp b/tests/testvolume.cpp index 2bd15cbd..74a3ffa1 100644 --- a/tests/testvolume.cpp +++ b/tests/testvolume.cpp @@ -312,7 +312,7 @@ TestVolume::~TestVolume() * RawVolume Tests */ -void TestVolume::testRawVolumeDirectAccessAllInternalForwards() +/*void TestVolume::testRawVolumeDirectAccessAllInternalForwards() { int32_t result = 0; @@ -398,13 +398,13 @@ void TestVolume::testRawVolumeSamplersWithExternalBackwards() result = testSamplersWithWrappingBackwards(m_pRawVolume, -1, -3, -2, 2, 5, 4); } QCOMPARE(result, static_cast(-769775893)); -} +}*/ /* * SimpleVolume Tests */ -void TestVolume::testSimpleVolumeDirectAccessAllInternalForwards() +/*void TestVolume::testSimpleVolumeDirectAccessAllInternalForwards() { int32_t result = 0; QBENCHMARK @@ -482,7 +482,7 @@ void TestVolume::testSimpleVolumeSamplersWithExternalBackwards() result = testSamplersWithWrappingBackwards(m_pSimpleVolume, -1, -3, -2, 2, 5, 4); } QCOMPARE(result, static_cast(-769775893)); -} +}*/ /* * LargeVolume Tests diff --git a/tests/testvolume.h b/tests/testvolume.h index 0c363109..59a63ec8 100644 --- a/tests/testvolume.h +++ b/tests/testvolume.h @@ -37,7 +37,7 @@ public: ~TestVolume(); private slots: - void testRawVolumeDirectAccessAllInternalForwards(); + /*void testRawVolumeDirectAccessAllInternalForwards(); void testRawVolumeSamplersAllInternalForwards(); void testRawVolumeDirectAccessWithExternalForwards(); void testRawVolumeSamplersWithExternalForwards(); @@ -53,7 +53,7 @@ private slots: void testSimpleVolumeDirectAccessAllInternalBackwards(); void testSimpleVolumeSamplersAllInternalBackwards(); void testSimpleVolumeDirectAccessWithExternalBackwards(); - void testSimpleVolumeSamplersWithExternalBackwards(); + void testSimpleVolumeSamplersWithExternalBackwards();*/ void testLargeVolumeDirectAccessAllInternalForwards(); void testLargeVolumeSamplersAllInternalForwards();