diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-04 15:31:19 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-04 15:31:19 -0800 |
commit | c9868071b113b251e03d95163118b696e28bbe98 (patch) | |
tree | 8428d2e97f7a61b1a10e7e10494199a39969369d /indra/llmath | |
parent | e833e7ad442f5b59f95c6ccfcaaf1d103d247d69 (diff) | |
parent | e8659e0e13c65308ad2f036dc7e7ccff0e665976 (diff) |
Merge from trunk. Conflicts manually resolved in:
U indra/llui/lluictrlfactory.cpp
U indra/newview/llinventorybridge.cpp
U indra/newview/llviewertexture.cpp
U indra/newview/llviewertexture.h
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/xform.cpp | 5 | ||||
-rw-r--r-- | indra/llmath/xform.h | 30 |
2 files changed, 23 insertions, 12 deletions
diff --git a/indra/llmath/xform.cpp b/indra/llmath/xform.cpp index ce6f756ab9..7a8b0cf6a3 100644 --- a/indra/llmath/xform.cpp +++ b/indra/llmath/xform.cpp @@ -42,6 +42,11 @@ LLXform::~LLXform() { } +// Link optimization - don't inline these llwarns +void LLXform::warn(const char* const msg) +{ + llwarns << msg << llendl; +} LLXform* LLXform::getRoot() const { diff --git a/indra/llmath/xform.h b/indra/llmath/xform.h index 5b7b1900bc..c4edd46279 100644 --- a/indra/llmath/xform.h +++ b/indra/llmath/xform.h @@ -107,6 +107,12 @@ public: inline void setRotation(const LLQuaternion& rot); inline void setRotation(const F32 x, const F32 y, const F32 z); inline void setRotation(const F32 x, const F32 y, const F32 z, const F32 s); + + // Above functions must be inline for speed, but also + // need to emit warnings. llwarns causes inline LLError::CallSite + // static objects that make more work for the linker. + // Avoid inline llwarns by calling this function. + void warn(const char* const msg); void setChanged(const U32 bits) { mChanged |= bits; } BOOL isChanged() const { return mChanged; } @@ -173,7 +179,7 @@ BOOL LLXform::setParent(LLXform* parent) { if (cur_par == this) { - //llwarns << "LLXform::setParent Creating loop when setting parent!" << llendl; + //warn("LLXform::setParent Creating loop when setting parent!"); return FALSE; } cur_par = cur_par->mParent; @@ -191,7 +197,7 @@ void LLXform::setPosition(const LLVector3& pos) else { mPosition.clearVec(); - llwarns << "Non Finite in LLXform::setPosition(LLVector3)" << llendl; + warn("Non Finite in LLXform::setPosition(LLVector3)"); } } @@ -203,7 +209,7 @@ void LLXform::setPosition(const F32 x, const F32 y, const F32 z) else { mPosition.clearVec(); - llwarns << "Non Finite in LLXform::setPosition(F32,F32,F32)" << llendl; + warn("Non Finite in LLXform::setPosition(F32,F32,F32)"); } } @@ -215,7 +221,7 @@ void LLXform::setPositionX(const F32 x) else { mPosition.mV[VX] = 0.f; - llwarns << "Non Finite in LLXform::setPositionX" << llendl; + warn("Non Finite in LLXform::setPositionX"); } } @@ -227,7 +233,7 @@ void LLXform::setPositionY(const F32 y) else { mPosition.mV[VY] = 0.f; - llwarns << "Non Finite in LLXform::setPositionY" << llendl; + warn("Non Finite in LLXform::setPositionY"); } } @@ -239,7 +245,7 @@ void LLXform::setPositionZ(const F32 z) else { mPosition.mV[VZ] = 0.f; - llwarns << "Non Finite in LLXform::setPositionZ" << llendl; + warn("Non Finite in LLXform::setPositionZ"); } } @@ -249,7 +255,7 @@ void LLXform::addPosition(const LLVector3& pos) if (pos.isFinite()) mPosition += pos; else - llwarns << "Non Finite in LLXform::addPosition" << llendl; + warn("Non Finite in LLXform::addPosition"); } void LLXform::setScale(const LLVector3& scale) @@ -260,7 +266,7 @@ void LLXform::setScale(const LLVector3& scale) else { mScale.setVec(1.f, 1.f, 1.f); - llwarns << "Non Finite in LLXform::setScale" << llendl; + warn("Non Finite in LLXform::setScale"); } } void LLXform::setScale(const F32 x, const F32 y, const F32 z) @@ -271,7 +277,7 @@ void LLXform::setScale(const F32 x, const F32 y, const F32 z) else { mScale.setVec(1.f, 1.f, 1.f); - llwarns << "Non Finite in LLXform::setScale" << llendl; + warn("Non Finite in LLXform::setScale"); } } void LLXform::setRotation(const LLQuaternion& rot) @@ -282,7 +288,7 @@ void LLXform::setRotation(const LLQuaternion& rot) else { mRotation.loadIdentity(); - llwarns << "Non Finite in LLXform::setRotation" << llendl; + warn("Non Finite in LLXform::setRotation"); } } void LLXform::setRotation(const F32 x, const F32 y, const F32 z) @@ -295,7 +301,7 @@ void LLXform::setRotation(const F32 x, const F32 y, const F32 z) else { mRotation.loadIdentity(); - llwarns << "Non Finite in LLXform::setRotation" << llendl; + warn("Non Finite in LLXform::setRotation"); } } void LLXform::setRotation(const F32 x, const F32 y, const F32 z, const F32 s) @@ -308,7 +314,7 @@ void LLXform::setRotation(const F32 x, const F32 y, const F32 z, const F32 s) else { mRotation.loadIdentity(); - llwarns << "Non Finite in LLXform::setRotation" << llendl; + warn("Non Finite in LLXform::setRotation"); } } |