Replaced some more logging commands with macros which can be compiled out.
This commit is contained in:
		| @@ -62,10 +62,7 @@ namespace PolyVox | ||||
| 		{ | ||||
| 			for(std::vector<std::string>::iterator iter = m_vecCreatedFiles.begin(); iter < m_vecCreatedFiles.end(); iter++) | ||||
| 			{ | ||||
| 				if(!std::remove(iter->c_str())) | ||||
| 				{ | ||||
| 					logWarning() << "Failed to delete '" << *iter << "' when destroying FilePager"; | ||||
| 				} | ||||
| 				POLYVOX_LOG_WARNING_IF(!std::remove(iter->c_str()), "Failed to delete '" << *iter << "' when destroying FilePager"); | ||||
| 			} | ||||
|  | ||||
| 			m_vecCreatedFiles.clear(); | ||||
|   | ||||
| @@ -258,8 +258,8 @@ namespace PolyVox | ||||
| 		m_uMaxNumberOfUncompressedBlocks = uMaxNumberOfUncompressedBlocks; | ||||
|  | ||||
| 		uint32_t uUncompressedBlockSizeInBytes = m_uBlockSideLength * m_uBlockSideLength * m_uBlockSideLength * sizeof(VoxelType); | ||||
| 		logDebug() << "The maximum number of uncompresed blocks has been set to " << m_uMaxNumberOfUncompressedBlocks | ||||
| 			<< ", which is " << m_uMaxNumberOfUncompressedBlocks * uUncompressedBlockSizeInBytes << " bytes";  | ||||
| 		POLYVOX_LOG_DEBUG("The maximum number of uncompresed blocks has been set to " << m_uMaxNumberOfUncompressedBlocks | ||||
| 			<< ", which is " << m_uMaxNumberOfUncompressedBlocks * uUncompressedBlockSizeInBytes << " bytes");  | ||||
| 	} | ||||
|  | ||||
| 	//////////////////////////////////////////////////////////////////////////////// | ||||
|   | ||||
| @@ -68,8 +68,8 @@ namespace PolyVox | ||||
| 		uint32_t expectedCompressedSize = getExpectedCompressedSize(uSrcLength); | ||||
| 		if(m_vecTempBuffer.size() != expectedCompressedSize) | ||||
| 		{ | ||||
| 			logInfo() << "Resizing temp buffer to " << expectedCompressedSize << "bytes. " | ||||
| 				<< "This should only happen the first time the MinizBlockCompressor is used"; | ||||
| 			POLYVOX_LOG_INFO("Resizing temp buffer to " << expectedCompressedSize << "bytes. " | ||||
| 				<< "This should only happen the first time the MinizBlockCompressor is used"); | ||||
| 			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 | ||||
| 			// 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. | ||||
| 			logWarning() << "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 compressor failed to compress the block, probabaly due to the buffer being too small."); | ||||
| 			POLYVOX_LOG_WARNING("The compression will be tried again with a larger buffer."); | ||||
|  | ||||
| 			std::vector<uint8_t> vecExtraBigBuffer; | ||||
| 			vecExtraBigBuffer.resize(getMaxCompressedSize(uSrcLength)); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user