summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-06-30 11:42:16 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-06-30 11:42:16 -0400
commit1c05b8cc3269531f781f1e97260868509b757327 (patch)
tree6582684752b4c986a5b77e70c5e4ec6c06500b39
parentd2c33f655a204192b9a3058f29e39afa6a9c41d5 (diff)
Cleanup - moved small utility class
-rw-r--r--indra/newview/llappearancemgr.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index ddbec25c04..547dfd7006 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -55,6 +55,25 @@
#include "llviewerregion.h"
#include "llwearablelist.h"
+// RAII thingy to guarantee that a variable gets reset when the Setter
+// goes out of scope. More general utility would be handy - TODO:
+// check boost.
+class BoolSetter
+{
+public:
+ BoolSetter(bool& var):
+ mVar(var)
+ {
+ mVar = true;
+ }
+ ~BoolSetter()
+ {
+ mVar = false;
+ }
+private:
+ bool& mVar;
+};
+
char ORDER_NUMBER_SEPARATOR('@');
class LLOutfitUnLockTimer: public LLEventTimer
@@ -1598,22 +1617,6 @@ void LLAppearanceMgr::enforceItemCountLimits()
}
}
-class BoolSetter
-{
-public:
- BoolSetter(bool& var):
- mVar(var)
- {
- mVar = true;
- }
- ~BoolSetter()
- {
- mVar = false;
- }
-private:
- bool& mVar;
-};
-
void LLAppearanceMgr::updateAppearanceFromCOF()
{
if (mIsInUpdateAppearanceFromCOF)