summaryrefslogtreecommitdiff
path: root/indra/llinventory/llinventorysettings.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-11-11 23:34:37 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-11-11 23:34:37 +0200
commit92af5af736c2d6f3ac2f3ae5539da4bdea22e2a5 (patch)
tree888a19c6343d37ff1fc8fd22362799c143671a93 /indra/llinventory/llinventorysettings.cpp
parentb1f84f13a8a1d0404e4593ac413b66af8d135f40 (diff)
parent04c473ab46041133ea6a87dbe0d43e662472adf5 (diff)
Merge branch 'master' (DRTVWR-507-maint) into DRTVWR-521-maint
# Conflicts: # autobuild.xml # indra/llcommon/llerror.cpp
Diffstat (limited to 'indra/llinventory/llinventorysettings.cpp')
-rw-r--r--indra/llinventory/llinventorysettings.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/indra/llinventory/llinventorysettings.cpp b/indra/llinventory/llinventorysettings.cpp
index fdad50e8d4..81485b3a97 100644
--- a/indra/llinventory/llinventorysettings.cpp
+++ b/indra/llinventory/llinventorysettings.cpp
@@ -33,10 +33,6 @@
#include "llsingleton.h"
#include "llinvtranslationbrdg.h"
-//=========================================================================
-namespace {
- LLTranslationBridge::ptr_t sTranslator;
-}
//=========================================================================
struct SettingsEntry : public LLDictionaryEntry
@@ -49,7 +45,7 @@ struct SettingsEntry : public LLDictionaryEntry
mLabel(name),
mIconName(iconName)
{
- std::string transdname = sTranslator->getString(mLabel);
+ std::string transdname = LLSettingsType::getInstance()->mTranslator->getString(mLabel);
if (!transdname.empty())
{
mLabel = transdname;
@@ -84,6 +80,16 @@ void LLSettingsDictionary::initSingleton()
//=========================================================================
+LLSettingsType::LLSettingsType(LLTranslationBridge::ptr_t &trans)
+{
+ mTranslator = trans;
+}
+
+LLSettingsType::~LLSettingsType()
+{
+ mTranslator.reset();
+}
+
LLSettingsType::type_e LLSettingsType::fromInventoryFlags(U32 flags)
{
return (LLSettingsType::type_e)(flags & LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK);
@@ -104,13 +110,3 @@ std::string LLSettingsType::getDefaultName(LLSettingsType::type_e type)
return getDefaultName(ST_INVALID);
return entry->mDefaultNewName;
}
-
-void LLSettingsType::initClass(LLTranslationBridge::ptr_t &trans)
-{
- sTranslator = trans;
-}
-
-void LLSettingsType::cleanupClass()
-{
- sTranslator.reset();
-}