summaryrefslogtreecommitdiff
path: root/indra/llappearance/llwearabletype.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llappearance/llwearabletype.h')
-rw-r--r--indra/llappearance/llwearabletype.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h
index ac81376538..5fe969822a 100644
--- a/indra/llappearance/llwearabletype.h
+++ b/indra/llappearance/llwearabletype.h
@@ -42,8 +42,11 @@ public:
};
-class LLWearableType
+class LLWearableType : public LLParamSingleton<LLWearableType>
{
+ LLSINGLETON(LLWearableType, LLTranslationBridge* trans);
+ ~LLWearableType();
+ friend struct WearableEntry;
public:
enum EType
{
@@ -70,9 +73,8 @@ public:
WT_NONE = -1,
};
- static void initClass(LLTranslationBridge* trans); // initializes static members
- static void cleanupClass(); // initializes static members
-
+ // Most methods are wrappers for dictionary, but if LLWearableType is not initialized,
+ // they will crash. Whole LLWearableType is just wrapper for convinient calls.
static const std::string& getTypeName(EType type);
static const std::string& getTypeDefaultNewName(EType type);
static const std::string& getTypeLabel(EType type);
@@ -81,11 +83,12 @@ public:
static LLInventoryType::EIconName getIconName(EType type);
static BOOL getDisableCameraSwitch(EType type);
static BOOL getAllowMultiwear(EType type);
- static EType inventoryFlagsToWearableType(U32 flags);
+
+ static EType inventoryFlagsToWearableType(U32 flags);
protected:
- LLWearableType() {}
- ~LLWearableType() {}
+
+ LLTranslationBridge* mTrans;
};
#endif // LL_LLWEARABLETYPE_H