Replaced some more logging commands with macros which can be compiled out.
This commit is contained in:
parent
4c29d59430
commit
2ae5667986
@ -62,10 +62,7 @@ namespace PolyVox
|
|||||||
{
|
{
|
||||||
for(std::vector<std::string>::iterator iter = m_vecCreatedFiles.begin(); iter < m_vecCreatedFiles.end(); iter++)
|
for(std::vector<std::string>::iterator iter = m_vecCreatedFiles.begin(); iter < m_vecCreatedFiles.end(); iter++)
|
||||||
{
|
{
|
||||||
if(!std::remove(iter->c_str()))
|
POLYVOX_LOG_WARNING_IF(!std::remove(iter->c_str()), "Failed to delete '" << *iter << "' when destroying FilePager");
|
||||||
{
|
|
||||||
logWarning() << "Failed to delete '" << *iter << "' when destroying FilePager";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_vecCreatedFiles.clear();
|
m_vecCreatedFiles.clear();
|
||||||
|
@ -258,8 +258,8 @@ namespace PolyVox
|
|||||||
m_uMaxNumberOfUncompressedBlocks = uMaxNumberOfUncompressedBlocks;
|
m_uMaxNumberOfUncompressedBlocks = uMaxNumberOfUncompressedBlocks;
|
||||||
|
|
||||||
uint32_t uUncompressedBlockSizeInBytes = m_uBlockSideLength * m_uBlockSideLength * m_uBlockSideLength * sizeof(VoxelType);
|
uint32_t uUncompressedBlockSizeInBytes = m_uBlockSideLength * m_uBlockSideLength * m_uBlockSideLength * sizeof(VoxelType);
|
||||||
logDebug() << "The maximum number of uncompresed blocks has been set to " << m_uMaxNumberOfUncompressedBlocks
|
POLYVOX_LOG_DEBUG("The maximum number of uncompresed blocks has been set to " << m_uMaxNumberOfUncompressedBlocks
|
||||||
<< ", which is " << m_uMaxNumberOfUncompressedBlocks * uUncompressedBlockSizeInBytes << " bytes";
|
<< ", which is " << m_uMaxNumberOfUncompressedBlocks * uUncompressedBlockSizeInBytes << " bytes");
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -68,8 +68,8 @@ namespace PolyVox
|
|||||||
uint32_t expectedCompressedSize = getExpectedCompressedSize(uSrcLength);
|
uint32_t expectedCompressedSize = getExpectedCompressedSize(uSrcLength);
|
||||||
if(m_vecTempBuffer.size() != expectedCompressedSize)
|
if(m_vecTempBuffer.size() != expectedCompressedSize)
|
||||||
{
|
{
|
||||||
logInfo() << "Resizing temp buffer to " << expectedCompressedSize << "bytes. "
|
POLYVOX_LOG_INFO("Resizing temp buffer to " << expectedCompressedSize << "bytes. "
|
||||||
<< "This should only happen the first time the MinizBlockCompressor is used";
|
<< "This should only happen the first time the MinizBlockCompressor is used");
|
||||||
m_vecTempBuffer.resize(expectedCompressedSize);
|
m_vecTempBuffer.resize(expectedCompressedSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,8 +90,8 @@ namespace PolyVox
|
|||||||
// It is possible for the compression to fail. A common cause for this would be if the destination
|
// It is possible for the compression to fail. A common cause for this would be if the destination
|
||||||
// buffer is not big enough. So now we try again using a buffer that is definitely big enough.
|
// buffer is not big enough. So now we try again using a buffer that is definitely big enough.
|
||||||
// Note that ideally we will choose our earlier buffer size so that this almost never happens.
|
// Note that ideally we will choose our earlier buffer size so that this almost never happens.
|
||||||
logWarning() << "The compressor failed to compress the block, probabaly due to the buffer being too small.";
|
POLYVOX_LOG_WARNING("The compressor failed to compress the block, probabaly due to the buffer being too small.");
|
||||||
logWarning() << "The compression will be tried again with a larger buffer.";
|
POLYVOX_LOG_WARNING("The compression will be tried again with a larger buffer.");
|
||||||
|
|
||||||
std::vector<uint8_t> vecExtraBigBuffer;
|
std::vector<uint8_t> vecExtraBigBuffer;
|
||||||
vecExtraBigBuffer.resize(getMaxCompressedSize(uSrcLength));
|
vecExtraBigBuffer.resize(getMaxCompressedSize(uSrcLength));
|
||||||
|
@ -45,7 +45,7 @@ namespace PolyVox
|
|||||||
LARGE_INTEGER li;
|
LARGE_INTEGER li;
|
||||||
if(!QueryPerformanceFrequency(&li))
|
if(!QueryPerformanceFrequency(&li))
|
||||||
{
|
{
|
||||||
logWarning() << "QueryPerformanceFrequency failed!";
|
POLYVOX_LOG_WARNING("QueryPerformanceFrequency failed!");
|
||||||
m_fPCFreq = 1.0f;
|
m_fPCFreq = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user