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

@@ -39,7 +39,8 @@
//-----------------------------------------------------------------------------
// LLTexLayerParam
//-----------------------------------------------------------------------------
LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) :
LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer)
: LLViewerVisualParam(),
mTexLayer(layer),
mAvatarAppearance(NULL)
{
@@ -49,16 +50,23 @@ LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) :
}
else
{
llerrs << "LLTexLayerParam constructor passed with NULL reference for layer!" << llendl;
LL_ERRS() << "LLTexLayerParam constructor passed with NULL reference for layer!" << LL_ENDL;
}
}
LLTexLayerParam::LLTexLayerParam(LLAvatarAppearance *appearance) :
LLTexLayerParam::LLTexLayerParam(LLAvatarAppearance *appearance)
: LLViewerVisualParam(),
mTexLayer(NULL),
mAvatarAppearance(appearance)
{
}
LLTexLayerParam::LLTexLayerParam(const LLTexLayerParam& pOther)
: LLViewerVisualParam(pOther),
mTexLayer(pOther.mTexLayer),
mAvatarAppearance(pOther.mAvatarAppearance)
{
}
BOOL LLTexLayerParam::setInfo(LLViewerVisualParamInfo *info, BOOL add_to_appearance)
{
@@ -86,7 +94,7 @@ void LLTexLayerParamAlpha::dumpCacheByteCount()
{
S32 gl_bytes = 0;
getCacheByteCount( &gl_bytes);
llinfos << "Processed Alpha Texture Cache GL:" << (gl_bytes/1024) << "KB" << llendl;
LL_INFOS() << "Processed Alpha Texture Cache GL:" << (gl_bytes/1024) << "KB" << LL_ENDL;
}
// static
@@ -111,9 +119,11 @@ void LLTexLayerParamAlpha::getCacheByteCount(S32* gl_bytes)
}
}
LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLTexLayerInterface* layer) :
LLTexLayerParam(layer),
LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLTexLayerInterface* layer)
: LLTexLayerParam(layer),
mCachedProcessedTexture(NULL),
mStaticImageTGA(),
mStaticImageRaw(),
mNeedsCreateTexture(FALSE),
mStaticImageInvalid(FALSE),
mAvgDistortionVec(1.f, 1.f, 1.f),
@@ -122,9 +132,11 @@ LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLTexLayerInterface* layer) :
sInstances.push_front(this);
}
LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLAvatarAppearance* appearance) :
LLTexLayerParam(appearance),
LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLAvatarAppearance* appearance)
: LLTexLayerParam(appearance),
mCachedProcessedTexture(NULL),
mStaticImageTGA(),
mStaticImageRaw(),
mNeedsCreateTexture(FALSE),
mStaticImageInvalid(FALSE),
mAvgDistortionVec(1.f, 1.f, 1.f),
@@ -133,6 +145,18 @@ LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLAvatarAppearance* appearance) :
sInstances.push_front(this);
}
LLTexLayerParamAlpha::LLTexLayerParamAlpha(const LLTexLayerParamAlpha& pOther)
: LLTexLayerParam(pOther),
mCachedProcessedTexture(pOther.mCachedProcessedTexture),
mStaticImageTGA(pOther.mStaticImageTGA),
mStaticImageRaw(pOther.mStaticImageRaw),
mNeedsCreateTexture(pOther.mNeedsCreateTexture),
mStaticImageInvalid(pOther.mStaticImageInvalid),
mAvgDistortionVec(pOther.mAvgDistortionVec),
mCachedEffectiveWeight(pOther.mCachedEffectiveWeight)
{
sInstances.push_front(this);
}
LLTexLayerParamAlpha::~LLTexLayerParamAlpha()
{
@@ -142,9 +166,7 @@ LLTexLayerParamAlpha::~LLTexLayerParamAlpha()
/*virtual*/ LLViewerVisualParam* LLTexLayerParamAlpha::cloneParam(LLWearable* wearable) const
{
LLTexLayerParamAlpha *new_param = new LLTexLayerParamAlpha(mTexLayer);
*new_param = *this;
return new_param;
return new LLTexLayerParamAlpha(*this);
}
void LLTexLayerParamAlpha::deleteCaches()
@@ -160,7 +182,7 @@ BOOL LLTexLayerParamAlpha::getMultiplyBlend() const
return ((LLTexLayerParamAlphaInfo *)getInfo())->mMultiplyBlend;
}
void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL upload_bake)
void LLTexLayerParamAlpha::setWeight(F32 weight, bool upload_bake)
{
if (mIsAnimating || mTexLayer == NULL)
{
@@ -184,7 +206,7 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL upload_bake)
}
}
void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL upload_bake)
void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, bool upload_bake)
{
// do not animate dummy parameters
if (mIsDummy)
@@ -202,7 +224,7 @@ void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL upload_bake
}
}
void LLTexLayerParamAlpha::animate(F32 delta, BOOL upload_bake)
void LLTexLayerParamAlpha::animate(F32 delta, bool upload_bake)
{
if (mNext)
{
@@ -278,7 +300,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
if (mStaticImageTGA.isNull())
{
llwarns << "Unable to load static file: " << info->mStaticImageFileName << llendl;
LL_WARNS() << "Unable to load static file: " << info->mStaticImageFileName << LL_ENDL;
mStaticImageInvalid = TRUE; // don't try again.
return FALSE;
}
@@ -309,7 +331,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
mStaticImageRaw = new LLImageRaw;
mStaticImageTGA->decodeAndProcess(mStaticImageRaw, info->mDomain, effective_weight);
mNeedsCreateTexture = TRUE;
lldebugs << "Built Cached Alpha: " << info->mStaticImageFileName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << "Domain: " << info->mDomain << " Weight: " << effective_weight << llendl;
LL_DEBUGS() << "Built Cached Alpha: " << info->mStaticImageFileName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << "Domain: " << info->mDomain << " Weight: " << effective_weight << LL_ENDL;
}
if (mCachedProcessedTexture)
@@ -380,7 +402,7 @@ BOOL LLTexLayerParamAlphaInfo::parseXml(LLXmlTreeNode* node)
}
// else
// {
// llwarns << "<param_alpha> element is missing tga_file attribute." << llendl;
// LL_WARNS() << "<param_alpha> element is missing tga_file attribute." << LL_ENDL;
// }
static LLStdStringHandle multiply_blend_string = LLXmlTree::addAttributeString("multiply_blend");
@@ -398,27 +420,31 @@ BOOL LLTexLayerParamAlphaInfo::parseXml(LLXmlTreeNode* node)
LLTexLayerParamColor::LLTexLayerParamColor(LLTexLayerInterface* layer) :
LLTexLayerParam(layer),
LLTexLayerParamColor::LLTexLayerParamColor(LLTexLayerInterface* layer)
: LLTexLayerParam(layer),
mAvgDistortionVec(1.f, 1.f, 1.f)
{
}
LLTexLayerParamColor::LLTexLayerParamColor(LLAvatarAppearance *appearance) :
LLTexLayerParam(appearance),
LLTexLayerParamColor::LLTexLayerParamColor(LLAvatarAppearance *appearance)
: LLTexLayerParam(appearance),
mAvgDistortionVec(1.f, 1.f, 1.f)
{
}
LLTexLayerParamColor::LLTexLayerParamColor(const LLTexLayerParamColor& pOther)
: LLTexLayerParam(pOther),
mAvgDistortionVec(pOther.mAvgDistortionVec)
{
}
LLTexLayerParamColor::~LLTexLayerParamColor()
{
}
/*virtual*/ LLViewerVisualParam* LLTexLayerParamColor::cloneParam(LLWearable* wearable) const
{
LLTexLayerParamColor *new_param = new LLTexLayerParamColor(mTexLayer);
*new_param = *this;
return new_param;
return new LLTexLayerParamColor(*this);
}
LLColor4 LLTexLayerParamColor::getNetColor() const
@@ -449,14 +475,13 @@ LLColor4 LLTexLayerParamColor::getNetColor() const
}
}
void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake)
void LLTexLayerParamColor::setWeight(F32 weight, bool upload_bake)
{
if (mIsAnimating)
{
return;
}
const LLTexLayerParamColorInfo *info = (LLTexLayerParamColorInfo *)getInfo();
F32 min_weight = getMinWeight();
F32 max_weight = getMaxWeight();
F32 new_weight = llclamp(weight, min_weight, max_weight);
@@ -466,6 +491,8 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake)
{
mCurWeight = new_weight;
const LLTexLayerParamColorInfo *info = (LLTexLayerParamColorInfo *)getInfo();
if (info->mNumColors <= 0)
{
// This will happen when we set the default weight the first time.
@@ -481,11 +508,11 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake)
}
}
// llinfos << "param " << mName << " = " << new_weight << llendl;
// LL_INFOS() << "param " << mName << " = " << new_weight << LL_ENDL;
}
}
void LLTexLayerParamColor::setAnimationTarget(F32 target_value, BOOL upload_bake)
void LLTexLayerParamColor::setAnimationTarget(F32 target_value, bool upload_bake)
{
// set value first then set interpolating flag to ignore further updates
mTargetWeight = target_value;
@@ -497,7 +524,7 @@ void LLTexLayerParamColor::setAnimationTarget(F32 target_value, BOOL upload_bake
}
}
void LLTexLayerParamColor::animate(F32 delta, BOOL upload_bake)
void LLTexLayerParamColor::animate(F32 delta, bool upload_bake)
{
if (mNext)
{
@@ -556,13 +583,13 @@ BOOL LLTexLayerParamColorInfo::parseXml(LLXmlTreeNode *node)
}
if (!mNumColors)
{
llwarns << "<param_color> is missing <value> sub-elements" << llendl;
LL_WARNS() << "<param_color> is missing <value> sub-elements" << LL_ENDL;
return FALSE;
}
if ((mOperation == LLTexLayerParamColor::OP_BLEND) && (mNumColors != 1))
{
llwarns << "<param_color> with operation\"blend\" must have exactly one <value>" << llendl;
LL_WARNS() << "<param_color> with operation\"blend\" must have exactly one <value>" << LL_ENDL;
return FALSE;
}