More tidying up.

This commit is contained in:
David Williams
2011-02-12 20:47:01 +00:00
parent 9b3deca7f0
commit ed355b856f
6 changed files with 80 additions and 54 deletions

View File

@ -65,7 +65,6 @@ namespace PolyVox
void uncompress(VoxelType* pData);
std::vector< RunlengthEntry<uint16_t> > m_vecCompressedData;
uint64_t m_uTimestamp;
VoxelType* m_tUncompressedData;
uint16_t m_uSideLength;
uint8_t m_uSideLengthPower;

View File

@ -39,7 +39,6 @@ namespace PolyVox
,m_tUncompressedData(0)
,m_bIsCompressed(true)
,m_bIsUncompressedDataModified(true)
,m_uTimestamp(0)
{
if(uSideLength != 0)
{
@ -148,7 +147,7 @@ namespace PolyVox
uint32_t Block<VoxelType>::sizeInBytes(void)
{
uint32_t uSizeInBytes = sizeof(Block<VoxelType>);
uSizeInBytes += m_vecCompressedData.size() * sizeof(RunlengthEntry);
uSizeInBytes += m_vecCompressedData.capacity() * sizeof(RunlengthEntry);
return uSizeInBytes;
}
@ -207,11 +206,8 @@ namespace PolyVox
VoxelType* pUncompressedData = m_tUncompressedData;
for(uint32_t ct = 0; ct < m_vecCompressedData.size(); ++ct)
{
for(uint32_t i = 0; i < m_vecCompressedData[ct].length; ++i)
{
*pUncompressedData = m_vecCompressedData[ct].value;
++pUncompressedData;
}
std::fill(pUncompressedData, pUncompressedData + m_vecCompressedData[ct].length, m_vecCompressedData[ct].value);
pUncompressedData += m_vecCompressedData[ct].length;
}
m_bIsCompressed = false;