[EEP] Change to using LLTranslationBridge::ptr_t
This commit is contained in:
@@ -29,17 +29,17 @@
|
|||||||
#include "llinventorytype.h"
|
#include "llinventorytype.h"
|
||||||
#include "llinventorydefines.h"
|
#include "llinventorydefines.h"
|
||||||
|
|
||||||
static LLTranslationBridge* sTrans = NULL;
|
static LLTranslationBridge::ptr_t sTrans = NULL;
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLWearableType::initClass(LLTranslationBridge* trans)
|
void LLWearableType::initClass(LLTranslationBridge::ptr_t &trans)
|
||||||
{
|
{
|
||||||
sTrans = trans;
|
sTrans = trans;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLWearableType::cleanupClass()
|
void LLWearableType::cleanupClass()
|
||||||
{
|
{
|
||||||
delete sTrans;
|
sTrans.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct WearableEntry : public LLDictionaryEntry
|
struct WearableEntry : public LLDictionaryEntry
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public:
|
|||||||
WT_NONE = -1,
|
WT_NONE = -1,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void initClass(LLTranslationBridge* trans); // initializes static members
|
static void initClass(LLTranslationBridge::ptr_t &trans); // initializes static members
|
||||||
static void cleanupClass(); // initializes static members
|
static void cleanupClass(); // initializes static members
|
||||||
|
|
||||||
static const std::string& getTypeName(EType type);
|
static const std::string& getTypeName(EType type);
|
||||||
|
|||||||
@@ -640,7 +640,8 @@ bool LLAppViewer::init()
|
|||||||
|
|
||||||
// initialize LLWearableType translation bridge.
|
// initialize LLWearableType translation bridge.
|
||||||
// Memory will be cleaned up in ::cleanupClass()
|
// Memory will be cleaned up in ::cleanupClass()
|
||||||
LLWearableType::initClass(new LLUITranslationBridge());
|
LLTranslationBridge::ptr_t trans = std::make_shared<LLUITranslationBridge>();
|
||||||
|
LLWearableType::initClass(trans);
|
||||||
|
|
||||||
// <edit>
|
// <edit>
|
||||||
// We can call this early.
|
// We can call this early.
|
||||||
|
|||||||
Reference in New Issue
Block a user