No longer include llerrorlegacy.h. Updated llstl to include deletion utilites.

This commit is contained in:
Shyotl
2015-06-19 03:54:20 -05:00
parent 283f5298d5
commit 1c627317ec
634 changed files with 8200 additions and 12214 deletions

View File

@@ -124,12 +124,12 @@ void LLImageBase::destroyPrivatePool()
// virtual
void LLImageBase::dump()
{
llinfos << "LLImageBase mComponents " << mComponents
LL_INFOS() << "LLImageBase mComponents " << mComponents
<< " mData " << mData
<< " mDataSize " << mDataSize
<< " mWidth " << mWidth
<< " mHeight " << mHeight
<< llendl;
<< LL_ENDL;
}
// virtual
@@ -141,13 +141,13 @@ void LLImageBase::sanityCheck()
|| mComponents > (S8)MAX_IMAGE_COMPONENTS
)
{
llerrs << "Failed LLImageBase::sanityCheck "
LL_ERRS() << "Failed LLImageBase::sanityCheck "
<< "width " << mWidth
<< "height " << mHeight
<< "datasize " << mDataSize
<< "components " << mComponents
<< "data " << mData
<< llendl;
<< LL_ENDL;
}
}
@@ -167,7 +167,7 @@ U8* LLImageBase::allocateData(S32 size)
size = mWidth * mHeight * mComponents;
if (size <= 0)
{
llerrs << llformat("LLImageBase::allocateData called with bad dimensions: %dx%dx%d",mWidth,mHeight,(S32)mComponents) << llendl;
LL_ERRS() << llformat("LLImageBase::allocateData called with bad dimensions: %dx%dx%d",mWidth,mHeight,(S32)mComponents) << LL_ENDL;
}
}
@@ -175,14 +175,14 @@ U8* LLImageBase::allocateData(S32 size)
static const U32 MAX_BUFFER_SIZE = 4096 * 4096 * 16 ; //256 MB
if (size < 1 || size > MAX_BUFFER_SIZE)
{
//llinfos << "width: " << mWidth << " height: " << mHeight << " components: " << mComponents << llendl ;
//LL_INFOS() << "width: " << mWidth << " height: " << mHeight << " components: " << mComponents << LL_ENDL ;
if(mAllowOverSize)
{
//llinfos << "Oversize: " << size << llendl ;
//LL_INFOS() << "Oversize: " << size << LL_ENDL ;
}
else
{
llerrs << "LLImageBase::allocateData: bad size: " << size << llendl;
LL_ERRS() << "LLImageBase::allocateData: bad size: " << size << LL_ENDL;
}
}
if (!mData || size != mDataSize)
@@ -192,7 +192,7 @@ U8* LLImageBase::allocateData(S32 size)
mData = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
if (!mData)
{
llwarns << "Failed to allocate image data size [" << size << "]" << llendl;
LL_WARNS() << "Failed to allocate image data size [" << size << "]" << LL_ENDL;
size = 0 ;
mWidth = mHeight = 0 ;
mBadBufferAllocation = true ;
@@ -211,12 +211,12 @@ U8* LLImageBase::reallocateData(S32 size)
size = mWidth * mHeight * mComponents;
if (size <= 0)
{
llerrs << llformat("LLImageBase::reallocateData called with bad dimensions: %dx%dx%d", mWidth, mHeight, (S32)mComponents) << llendl;
LL_ERRS() << llformat("LLImageBase::reallocateData called with bad dimensions: %dx%dx%d", mWidth, mHeight, (S32)mComponents) << LL_ENDL;
}
}
else if (size <= 0 || (size > 4096 * 4096 * 16 && !mAllowOverSize))
{
llerrs << "LLImageBase::reallocateData: bad size: " << size << llendl;
LL_ERRS() << "LLImageBase::reallocateData: bad size: " << size << LL_ENDL;
}
if(mData && (mDataSize == size))
@@ -225,7 +225,7 @@ U8* LLImageBase::reallocateData(S32 size)
U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
if (!new_datap)
{
llwarns << "Out of memory in LLImageBase::reallocateData" << llendl;
LL_WARNS() << "Out of memory in LLImageBase::reallocateData" << LL_ENDL;
return 0;
}
if (mData)
@@ -243,7 +243,7 @@ const U8* LLImageBase::getData() const
{
if(mBadBufferAllocation)
{
llerrs << "Bad memory allocation for the image buffer!" << llendl ;
LL_ERRS() << "Bad memory allocation for the image buffer!" << LL_ENDL ;
}
return mData;
@@ -253,7 +253,7 @@ U8* LLImageBase::getData()
{
if(mBadBufferAllocation)
{
llerrs << "Bad memory allocation for the image buffer!" << llendl ;
LL_ERRS() << "Bad memory allocation for the image buffer!" << LL_ENDL ;
}
return mData;
@@ -417,7 +417,7 @@ U8 * LLImageRaw::getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const
// Should do some simple bounds checking
if (!data)
{
llerrs << "Out of memory in LLImageRaw::getSubImage" << llendl;
LL_ERRS() << "Out of memory in LLImageRaw::getSubImage" << LL_ENDL;
return NULL;
}
@@ -512,7 +512,7 @@ void LLImageRaw::verticalFlip()
}
catch(std::bad_alloc)
{
llerrs << "Out of memory in LLImageRaw::verticalFlip()" << llendl;
LL_ERRS() << "Out of memory in LLImageRaw::verticalFlip()" << LL_ENDL;
}
}
@@ -634,7 +634,7 @@ void LLImageRaw::composite( LLImageRaw* src )
// Src and dst can be any size. Src has 4 components. Dst has 3 components.
void LLImageRaw::compositeScaled4onto3(LLImageRaw* src)
{
llinfos << "compositeScaled4onto3" << llendl;
LL_INFOS() << "compositeScaled4onto3" << LL_ENDL;
LLImageRaw* dst = this; // Just for clarity.
@@ -660,7 +660,7 @@ void LLImageRaw::compositeScaled4onto3(LLImageRaw* src)
}
catch(std::bad_alloc)
{
llerrs << "Out of memory in LLImageRaw::compositeScaled4onto3()" << llendl;
LL_ERRS() << "Out of memory in LLImageRaw::compositeScaled4onto3()" << LL_ENDL;
}
}
@@ -784,7 +784,7 @@ void LLImageRaw::copy(LLImageRaw* src)
{
if (!src)
{
llwarns << "LLImageRaw::copy called with a null src pointer" << llendl;
LL_WARNS() << "LLImageRaw::copy called with a null src pointer" << LL_ENDL;
return;
}
@@ -948,7 +948,7 @@ void LLImageRaw::copyScaled( LLImageRaw* src )
}
catch(std::bad_alloc)
{
llerrs << "Out of memory in LLImageRaw::copyScaled()" << llendl;
LL_ERRS() << "Out of memory in LLImageRaw::copyScaled()" << LL_ENDL;
}
}
@@ -1366,7 +1366,7 @@ bool LLImageRaw::createFromFile(const std::string &filename, bool j2c_lowest_mip
if (!ifs.is_open())
{
// SJB: changed from llinfos to lldebugs to reduce spam
lldebugs << "Unable to open image file: " << name << llendl;
LL_DEBUGS() << "Unable to open image file: " << name << LL_ENDL;
return false;
}
@@ -1380,7 +1380,7 @@ bool LLImageRaw::createFromFile(const std::string &filename, bool j2c_lowest_mip
if (!length)
{
llinfos << "Zero length file file: " << name << llendl;
LL_INFOS() << "Zero length file file: " << name << LL_ENDL;
return false;
}
@@ -1416,7 +1416,7 @@ bool LLImageRaw::createFromFile(const std::string &filename, bool j2c_lowest_mip
if (!success)
{
deleteData();
llwarns << "Unable to decode image" << name << llendl;
LL_WARNS() << "Unable to decode image" << name << LL_ENDL;
return false;
}
@@ -1520,11 +1520,11 @@ void LLImageFormatted::dump()
{
LLImageBase::dump();
llinfos << "LLImageFormatted"
LL_INFOS() << "LLImageFormatted"
<< " mDecoding " << mDecoding
<< " mCodec " << S32(mCodec)
<< " mDecoded " << mDecoded
<< llendl;
<< LL_ENDL;
}
//----------------------------------------------------------------------------
@@ -1607,11 +1607,11 @@ void LLImageFormatted::sanityCheck()
if (mCodec >= IMG_CODEC_EOF)
{
llerrs << "Failed LLImageFormatted::sanityCheck "
LL_ERRS() << "Failed LLImageFormatted::sanityCheck "
<< "decoding " << S32(mDecoding)
<< "decoded " << S32(mDecoded)
<< "codec " << S32(mCodec)
<< llendl;
<< LL_ENDL;
}
}
@@ -1784,7 +1784,7 @@ void LLImageBase::generateMip(const U8* indata, U8* mipdata, S32 width, S32 heig
*(U8*)data = (U8)(((U32)(indata[0]) + indata[1] + indata[in_width] + indata[in_width+1])>>2);
break;
default:
llerrs << "generateMmip called with bad num channels" << llendl;
LL_ERRS() << "generateMmip called with bad num channels" << LL_ENDL;
}
indata += nchannels*2;
data += nchannels;
@@ -1841,17 +1841,17 @@ F32 LLImageBase::calc_download_priority(F32 virtual_size, F32 visible_pixels, S3
bytes_weight *= bytes_weight;
//llinfos << "VS: " << virtual_size << llendl;
//LL_INFOS() << "VS: " << virtual_size << LL_ENDL;
F32 virtual_size_factor = virtual_size / (10.f*10.f);
// The goal is for weighted priority to be <= 0 when we've reached a point where
// we've sent enough data.
//llinfos << "BytesSent: " << bytes_sent << llendl;
//llinfos << "BytesWeight: " << bytes_weight << llendl;
//llinfos << "PreLog: " << bytes_weight * virtual_size_factor << llendl;
//LL_INFOS() << "BytesSent: " << bytes_sent << LL_ENDL;
//LL_INFOS() << "BytesWeight: " << bytes_weight << LL_ENDL;
//LL_INFOS() << "PreLog: " << bytes_weight * virtual_size_factor << LL_ENDL;
w_priority = (F32)log10(bytes_weight * virtual_size_factor);
//llinfos << "PreScale: " << w_priority << llendl;
//LL_INFOS() << "PreScale: " << w_priority << LL_ENDL;
// We don't want to affect how MANY bytes we send based on the visible pixels, but the order
// in which they're sent. We post-multiply so we don't change the zero point.