diff options
Diffstat (limited to 'indra/llimage/llimagej2c.cpp')
-rw-r--r-- | indra/llimage/llimagej2c.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index 44e6b89dd3..8241746a74 100644 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp @@ -29,6 +29,7 @@ #include "llmemtype.h" #include "lltimer.h" #include "llmath.h" +#include "llmemory.h" typedef LLImageJ2CImpl* (*CreateLLImageJ2CFunction)(); typedef void (*DestroyLLImageJ2CFunction)(LLImageJ2CImpl*); @@ -385,14 +386,14 @@ BOOL LLImageJ2C::loadAndValidate(const std::string &filename) } else { - U8 *data = new U8[file_size]; + U8 *data = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), file_size); apr_size_t bytes_read = file_size; apr_status_t s = apr_file_read(apr_file, data, &bytes_read); // modifies bytes_read infile.close() ; if (s != APR_SUCCESS || (S32)bytes_read != file_size) { - delete[] data; + FREE_MEM(LLImageBase::getPrivatePool(), data); setLastError("Unable to read entire file"); res = FALSE; } @@ -500,10 +501,10 @@ void LLImageCompressionTester::outputTestRecord(LLSD *sd) F32 decompressionRate = 0.0f; F32 compressionRate = 0.0f; - F32 totalkBInDecompression = (F32)(mTotalBytesInDecompression) / 1000.0; - F32 totalkBOutDecompression = (F32)(mTotalBytesOutDecompression) / 1000.0; - F32 totalkBInCompression = (F32)(mTotalBytesInCompression) / 1000.0; - F32 totalkBOutCompression = (F32)(mTotalBytesOutCompression) / 1000.0; + F32 totalkBInDecompression = (F32)(mTotalBytesInDecompression) / 1000.f; + F32 totalkBOutDecompression = (F32)(mTotalBytesOutDecompression) / 1000.f; + F32 totalkBInCompression = (F32)(mTotalBytesInCompression) / 1000.f; + F32 totalkBOutCompression = (F32)(mTotalBytesOutCompression) / 1000.f; if (!is_approx_zero(mTotalTimeDecompression)) { |