diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index 80e8b1719d91fa8218bc03adf577a75d63fe3c9f..918d13d4758b4d69e5d41dc74e29527b5bf09de6 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -548,7 +548,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, { gGL.flush(); { - LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(info->mStaticAlphaFileName, TRUE); + LLGLTexture* tex = LLTexLayerStaticImageList::getInstanceFast()->getTexture(info->mStaticAlphaFileName, TRUE); if( tex ) { LLGLSUIDefault gls_ui; @@ -1248,7 +1248,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou if( !getInfo()->mStaticImageFileName.empty() ) { { - LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask); + LLGLTexture* tex = LLTexLayerStaticImageList::getInstanceFast()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask); if( tex ) { gGL.getTexUnit(0)->bind(tex, TRUE); @@ -1371,7 +1371,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) if( !getInfo()->mStaticImageFileName.empty() ) { - LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture( getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask ); + LLGLTexture* tex = LLTexLayerStaticImageList::getInstanceFast()->getTexture( getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask ); if( tex ) { LLGLSNoAlphaTest gls_no_alpha_test; @@ -1500,7 +1500,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC if( !getInfo()->mStaticImageFileName.empty() && getInfo()->mStaticImageIsMask ) { - LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask); + LLGLTexture* tex = LLTexLayerStaticImageList::getInstanceFast()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask); if( tex ) { if( (tex->getComponents() == 4) || (tex->getComponents() == 1) ) @@ -1648,7 +1648,7 @@ LLUUID LLTexLayer::getUUID() const } if( !getInfo()->mStaticImageFileName.empty() ) { - LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask); + LLGLTexture* tex = LLTexLayerStaticImageList::getInstanceFast()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask); if( tex ) { uuid = tex->getID(); diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index ffb2541d2fa821223dc36999046eea89b44a0e7d..2d5429de04dacaa729580acc25a58f75c8ec8404 100644 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -295,7 +295,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) if (mStaticImageTGA.isNull()) { // Don't load the image file until we actually need it the first time. Like now. - mStaticImageTGA = LLTexLayerStaticImageList::getInstance()->getImageTGA(info->mStaticImageFileName); + mStaticImageTGA = LLTexLayerStaticImageList::getInstanceFast()->getImageTGA(info->mStaticImageFileName); // We now have something in one of our caches LLTexLayerSet::sHasCaches |= mStaticImageTGA.notNull() ? TRUE : FALSE; diff --git a/indra/llappearance/llwearabletype.cpp b/indra/llappearance/llwearabletype.cpp index 8ff78b0bef67ab472b3b6e2ca35b519a289aaed6..38a8ed6c584aae48364201a8f896d9f79d9a88b1 100644 --- a/indra/llappearance/llwearabletype.cpp +++ b/indra/llappearance/llwearabletype.cpp @@ -122,7 +122,7 @@ void LLWearableType::initSingleton() // static LLWearableType::EType LLWearableType::typeNameToType(const std::string& type_name) { - const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const LLWearableDictionary *dict = LLWearableDictionary::getInstanceFast(); const LLWearableType::EType wearable = dict->lookup(type_name); return wearable; } @@ -130,7 +130,7 @@ LLWearableType::EType LLWearableType::typeNameToType(const std::string& type_nam // static const std::string& LLWearableType::getTypeName(LLWearableType::EType type) { - const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const LLWearableDictionary *dict = LLWearableDictionary::getInstanceFast(); const WearableEntry *entry = dict->lookup(type); if (!entry) return getTypeName(WT_INVALID); return entry->mName; @@ -139,7 +139,7 @@ const std::string& LLWearableType::getTypeName(LLWearableType::EType type) //static const std::string& LLWearableType::getTypeDefaultNewName(LLWearableType::EType type) { - const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const LLWearableDictionary *dict = LLWearableDictionary::getInstanceFast(); const WearableEntry *entry = dict->lookup(type); if (!entry) return getTypeDefaultNewName(WT_INVALID); return entry->mDefaultNewName; @@ -148,7 +148,7 @@ const std::string& LLWearableType::getTypeDefaultNewName(LLWearableType::EType t // static const std::string& LLWearableType::getTypeLabel(LLWearableType::EType type) { - const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const LLWearableDictionary *dict = LLWearableDictionary::getInstanceFast(); const WearableEntry *entry = dict->lookup(type); if (!entry) return getTypeLabel(WT_INVALID); return entry->mLabel; @@ -157,7 +157,7 @@ const std::string& LLWearableType::getTypeLabel(LLWearableType::EType type) // static LLAssetType::EType LLWearableType::getAssetType(LLWearableType::EType type) { - const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const LLWearableDictionary *dict = LLWearableDictionary::getInstanceFast(); const WearableEntry *entry = dict->lookup(type); if (!entry) return getAssetType(WT_INVALID); return entry->mAssetType; @@ -166,7 +166,7 @@ LLAssetType::EType LLWearableType::getAssetType(LLWearableType::EType type) // static LLInventoryType::EIconName LLWearableType::getIconName(LLWearableType::EType type) { - const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const LLWearableDictionary *dict = LLWearableDictionary::getInstanceFast(); const WearableEntry *entry = dict->lookup(type); if (!entry) return getIconName(WT_INVALID); return entry->mIconName; @@ -175,7 +175,7 @@ LLInventoryType::EIconName LLWearableType::getIconName(LLWearableType::EType typ // static BOOL LLWearableType::getDisableCameraSwitch(LLWearableType::EType type) { - const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const LLWearableDictionary *dict = LLWearableDictionary::getInstanceFast(); const WearableEntry *entry = dict->lookup(type); if (!entry) return FALSE; return entry->mDisableCameraSwitch; @@ -184,7 +184,7 @@ BOOL LLWearableType::getDisableCameraSwitch(LLWearableType::EType type) // static BOOL LLWearableType::getAllowMultiwear(LLWearableType::EType type) { - const LLWearableDictionary *dict = LLWearableDictionary::getInstance(); + const LLWearableDictionary *dict = LLWearableDictionary::getInstanceFast(); const WearableEntry *entry = dict->lookup(type); if (!entry) return FALSE; return entry->mAllowMultiwear; diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp index a8f586b734d86bd93db43894620fc9845bd4a514..460c6c98747a8b26fb865e1a6bd630c336349551 100644 --- a/indra/llcommon/llassettype.cpp +++ b/indra/llcommon/llassettype.cpp @@ -107,13 +107,13 @@ const std::string LLAssetType::BADLOOKUP("llassettype_bad_lookup"); LLAssetType::EType LLAssetType::getType(std::string desc_name) { LLStringUtil::toUpper(desc_name); - return LLAssetDictionary::getInstance()->lookup(desc_name); + return LLAssetDictionary::getInstanceFast()->lookup(desc_name); } // static const std::string &LLAssetType::getDesc(LLAssetType::EType asset_type) { - const AssetEntry *entry = LLAssetDictionary::getInstance()->lookup(asset_type); + const AssetEntry *entry = LLAssetDictionary::getInstanceFast()->lookup(asset_type); if (entry) { return entry->mName; @@ -127,7 +127,7 @@ const std::string &LLAssetType::getDesc(LLAssetType::EType asset_type) // static const char *LLAssetType::lookup(LLAssetType::EType asset_type) { - const LLAssetDictionary *dict = LLAssetDictionary::getInstance(); + const LLAssetDictionary *dict = LLAssetDictionary::getInstanceFast(); const AssetEntry *entry = dict->lookup(asset_type); if (entry) { @@ -150,7 +150,7 @@ LLAssetType::EType LLAssetType::lookup(const std::string_view type_name) { if(type_name.empty()) return AT_UNKNOWN; - const LLAssetDictionary& dict = LLAssetDictionary::instance(); + const LLAssetDictionary& dict = LLAssetDictionary::instanceFast(); for (const auto& dict_pair : dict) { const AssetEntry *entry = dict_pair.second; @@ -165,7 +165,7 @@ LLAssetType::EType LLAssetType::lookup(const std::string_view type_name) // static const char *LLAssetType::lookupHumanReadable(LLAssetType::EType asset_type) { - const LLAssetDictionary *dict = LLAssetDictionary::getInstance(); + const LLAssetDictionary *dict = LLAssetDictionary::getInstanceFast(); const AssetEntry *entry = dict->lookup(asset_type); if (entry) { @@ -186,7 +186,7 @@ LLAssetType::EType LLAssetType::lookupHumanReadable(const char* name) // static LLAssetType::EType LLAssetType::lookupHumanReadable(const std::string_view readable_name) { - const LLAssetDictionary& dict = LLAssetDictionary::instance(); + const LLAssetDictionary& dict = LLAssetDictionary::instanceFast(); for (const auto& dict_pair : dict) { const AssetEntry *entry = dict_pair.second; @@ -201,7 +201,7 @@ LLAssetType::EType LLAssetType::lookupHumanReadable(const std::string_view reada // static bool LLAssetType::lookupCanLink(EType asset_type) { - const LLAssetDictionary *dict = LLAssetDictionary::getInstance(); + const LLAssetDictionary *dict = LLAssetDictionary::getInstanceFast(); const AssetEntry *entry = dict->lookup(asset_type); if (entry) { @@ -224,7 +224,7 @@ bool LLAssetType::lookupIsLinkType(EType asset_type) // static bool LLAssetType::lookupIsAssetFetchByIDAllowed(EType asset_type) { - const LLAssetDictionary *dict = LLAssetDictionary::getInstance(); + const LLAssetDictionary *dict = LLAssetDictionary::getInstanceFast(); const AssetEntry *entry = dict->lookup(asset_type); if (entry) { @@ -236,7 +236,7 @@ bool LLAssetType::lookupIsAssetFetchByIDAllowed(EType asset_type) // static bool LLAssetType::lookupIsAssetIDKnowable(EType asset_type) { - const LLAssetDictionary *dict = LLAssetDictionary::getInstance(); + const LLAssetDictionary *dict = LLAssetDictionary::getInstanceFast(); const AssetEntry *entry = dict->lookup(asset_type); if (entry) { diff --git a/indra/llinventory/llfoldertype.cpp b/indra/llinventory/llfoldertype.cpp index 5e738a3a347f567a995bc66c15c9a25482922f5e..d02ec7951f60a849e541e46f3c862924c2ad4b55 100644 --- a/indra/llinventory/llfoldertype.cpp +++ b/indra/llinventory/llfoldertype.cpp @@ -113,13 +113,13 @@ LLFolderDictionary::LLFolderDictionary() // static LLFolderType::EType LLFolderType::lookup(const std::string_view name) { - return LLFolderDictionary::getInstance()->lookup(name); + return LLFolderDictionary::getInstanceFast()->lookup(name); } // static const std::string &LLFolderType::lookup(LLFolderType::EType folder_type) { - const FolderEntry *entry = LLFolderDictionary::getInstance()->lookup(folder_type); + const FolderEntry *entry = LLFolderDictionary::getInstanceFast()->lookup(folder_type); if (entry) { return entry->mName; @@ -135,7 +135,7 @@ const std::string &LLFolderType::lookup(LLFolderType::EType folder_type) // you can't change certain properties such as their type. bool LLFolderType::lookupIsProtectedType(EType folder_type) { - const LLFolderDictionary *dict = LLFolderDictionary::getInstance(); + const LLFolderDictionary *dict = LLFolderDictionary::getInstanceFast(); const FolderEntry *entry = dict->lookup(folder_type); if (entry) { diff --git a/indra/llinventory/llinventorysettings.cpp b/indra/llinventory/llinventorysettings.cpp index 313e336edd8fb379c3c1381af77eab1daa91c0c3..6720ce7f9d7b9910423d2414e1590da28c2daead 100644 --- a/indra/llinventory/llinventorysettings.cpp +++ b/indra/llinventory/llinventorysettings.cpp @@ -97,7 +97,7 @@ LLSettingsType::type_e LLSettingsType::fromInventoryFlags(U32 flags) LLInventoryType::EIconName LLSettingsType::getIconName(LLSettingsType::type_e type) { - const SettingsEntry *entry = LLSettingsDictionary::instance().lookup(type); + const SettingsEntry *entry = LLSettingsDictionary::instanceFast().lookup(type); if (!entry) return getIconName(ST_INVALID); return entry->mIconName; @@ -105,7 +105,7 @@ LLInventoryType::EIconName LLSettingsType::getIconName(LLSettingsType::type_e ty std::string LLSettingsType::getDefaultName(LLSettingsType::type_e type) { - const SettingsEntry *entry = LLSettingsDictionary::instance().lookup(type); + const SettingsEntry *entry = LLSettingsDictionary::instanceFast().lookup(type); if (!entry) return getDefaultName(ST_INVALID); return entry->mDefaultNewName; diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp index 87030a16f844e08b0e0505093b39ea7ead2051fe..40f8dbc14863b7ce7bd673a8085fe80fab43cfb1 100644 --- a/indra/llinventory/llinventorytype.cpp +++ b/indra/llinventory/llinventorytype.cpp @@ -160,7 +160,7 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] = // static const std::string &LLInventoryType::lookup(EType type) { - const InventoryEntry *entry = LLInventoryDictionary::getInstance()->lookup(type); + const InventoryEntry *entry = LLInventoryDictionary::getInstanceFast()->lookup(type); if (!entry) return empty_string; return entry->mName; } @@ -168,7 +168,7 @@ const std::string &LLInventoryType::lookup(EType type) // static LLInventoryType::EType LLInventoryType::lookup(const std::string_view name) { - return LLInventoryDictionary::getInstance()->lookup(name); + return LLInventoryDictionary::getInstanceFast()->lookup(name); } // XUI:translate @@ -176,7 +176,7 @@ LLInventoryType::EType LLInventoryType::lookup(const std::string_view name) // static const std::string &LLInventoryType::lookupHumanReadable(EType type) { - const InventoryEntry *entry = LLInventoryDictionary::getInstance()->lookup(type); + const InventoryEntry *entry = LLInventoryDictionary::getInstanceFast()->lookup(type); if (!entry) return empty_string; return entry->mHumanName; } @@ -223,7 +223,7 @@ bool inventory_and_asset_types_match(LLInventoryType::EType inventory_type, if (LLAssetType::lookupIsLinkType(asset_type)) return true; - const InventoryEntry *entry = LLInventoryDictionary::getInstance()->lookup(inventory_type); + const InventoryEntry *entry = LLInventoryDictionary::getInstanceFast()->lookup(inventory_type); if (!entry) return false; for (InventoryEntry::asset_vec_t::const_iterator iter = entry->mAssetTypes.begin(); diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp index 3bfe57212a82be91b54e12b9f0634bc89bc77d7b..a17271e38e697f4f7d67f3750616f6e40dc0d13d 100644 --- a/indra/newview/llinventoryicon.cpp +++ b/indra/newview/llinventoryicon.cpp @@ -189,7 +189,7 @@ const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type, const std::string& LLInventoryIcon::getIconName(LLInventoryType::EIconName idx) { - const IconEntry *entry = LLIconDictionary::instance().lookup(idx); + const IconEntry *entry = LLIconDictionary::instanceFast().lookup(idx); return entry->mName; } diff --git a/indra/newview/llviewerassettype.cpp b/indra/newview/llviewerassettype.cpp index 75eed356d34bb703da11e71671352cbd82d965c0..750df51d9348b5a1b6c6bda27b920cec0370e91b 100644 --- a/indra/newview/llviewerassettype.cpp +++ b/indra/newview/llviewerassettype.cpp @@ -92,7 +92,7 @@ LLViewerAssetDictionary::LLViewerAssetDictionary() EDragAndDropType LLViewerAssetType::lookupDragAndDropType(EType asset_type) { - const LLViewerAssetDictionary *dict = LLViewerAssetDictionary::getInstance(); + const LLViewerAssetDictionary *dict = LLViewerAssetDictionary::getInstanceFast(); const ViewerAssetEntry *entry = dict->lookup(asset_type); if (entry) return entry->mDadType; diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp index 37d45b38ab1a81ab2d1c5c5d79dd2e267a81b7a3..44ac1a99ce341704e195782855ede4734f67fd35 100644 --- a/indra/newview/llviewerfoldertype.cpp +++ b/indra/newview/llviewerfoldertype.cpp @@ -226,7 +226,7 @@ bool LLViewerFolderDictionary::initEnsemblesFromFile() const std::string &LLViewerFolderType::lookupXUIName(LLFolderType::EType folder_type) { - const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type); + const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstanceFast()->lookup(folder_type); if (entry) { return entry->mName; @@ -236,12 +236,12 @@ const std::string &LLViewerFolderType::lookupXUIName(LLFolderType::EType folder_ LLFolderType::EType LLViewerFolderType::lookupTypeFromXUIName(const std::string &name) { - return LLViewerFolderDictionary::getInstance()->lookup(name); + return LLViewerFolderDictionary::getInstanceFast()->lookup(name); } const std::string &LLViewerFolderType::lookupIconName(LLFolderType::EType folder_type, BOOL is_open) { - const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type); + const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstanceFast()->lookup(folder_type); if (entry) { if (is_open) @@ -251,7 +251,7 @@ const std::string &LLViewerFolderType::lookupIconName(LLFolderType::EType folder } // Error condition. Return something so that we don't show a grey box in inventory view. - const ViewerFolderEntry *default_entry = LLViewerFolderDictionary::getInstance()->lookup(LLFolderType::FT_NONE); + const ViewerFolderEntry *default_entry = LLViewerFolderDictionary::getInstanceFast()->lookup(LLFolderType::FT_NONE); if (default_entry) { return default_entry->mIconNameClosed; @@ -263,7 +263,7 @@ const std::string &LLViewerFolderType::lookupIconName(LLFolderType::EType folder BOOL LLViewerFolderType::lookupIsQuietType(LLFolderType::EType folder_type) { - const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type); + const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstanceFast()->lookup(folder_type); if (entry) { return entry->mIsQuiet; @@ -273,7 +273,7 @@ BOOL LLViewerFolderType::lookupIsQuietType(LLFolderType::EType folder_type) bool LLViewerFolderType::lookupIsHiddenIfEmpty(LLFolderType::EType folder_type) { - const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type); + const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstanceFast()->lookup(folder_type); if (entry) { return entry->mHideIfEmpty; @@ -283,7 +283,7 @@ bool LLViewerFolderType::lookupIsHiddenIfEmpty(LLFolderType::EType folder_type) const std::string &LLViewerFolderType::lookupNewCategoryName(LLFolderType::EType folder_type) { - const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type); + const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstanceFast()->lookup(folder_type); if (entry) { return entry->mNewCategoryName; @@ -293,7 +293,7 @@ const std::string &LLViewerFolderType::lookupNewCategoryName(LLFolderType::EType LLFolderType::EType LLViewerFolderType::lookupTypeFromNewCategoryName(const std::string& name) { - for (const auto& pair : LLViewerFolderDictionary::instance()) + for (const auto& pair : LLViewerFolderDictionary::instanceFast()) { const ViewerFolderEntry *entry = pair.second; if (entry->mNewCategoryName == name) @@ -308,7 +308,7 @@ LLFolderType::EType LLViewerFolderType::lookupTypeFromNewCategoryName(const std: U64 LLViewerFolderType::lookupValidFolderTypes(const std::string& item_name) { U64 matching_folders = 0; - for (const auto& pair : LLViewerFolderDictionary::instance()) + for (const auto& pair : LLViewerFolderDictionary::instanceFast()) { const ViewerFolderEntry *entry = pair.second; if (entry->getIsAllowedName(item_name)) diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index a328a77c366309a4ab5c765eb24acbb69a14e289..ec3f6d1ab8aa686d24eff3072c32200df919c9f1 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -505,7 +505,7 @@ BOOL LLViewerInventoryItem::unpackMessage(const LLSD& item) { BOOL rv = LLInventoryItem::fromLLSD(item); - LLLocalizedInventoryItemsDictionary::getInstance()->localizeInventoryObjectName(mName); + LLLocalizedInventoryItemsDictionary::getInstanceFast()->localizeInventoryObjectName(mName); mIsComplete = TRUE; return rv; @@ -516,7 +516,7 @@ BOOL LLViewerInventoryItem::unpackMessage(LLMessageSystem* msg, const char* bloc { BOOL rv = LLInventoryItem::unpackMessage(msg, block, block_num); - LLLocalizedInventoryItemsDictionary::getInstance()->localizeInventoryObjectName(mName); + LLLocalizedInventoryItemsDictionary::getInstanceFast()->localizeInventoryObjectName(mName); mIsComplete = TRUE; return rv; @@ -841,7 +841,7 @@ void LLViewerInventoryCategory::changeType(LLFolderType::EType new_folder_type) void LLViewerInventoryCategory::localizeName() { - LLLocalizedInventoryItemsDictionary::getInstance()->localizeInventoryObjectName(mName); + LLLocalizedInventoryItemsDictionary::getInstanceFast()->localizeInventoryObjectName(mName); } // virtual @@ -1044,7 +1044,7 @@ void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, std::string server_name = name; { - for (const auto& pair : LLLocalizedInventoryItemsDictionary::getInstance()->mInventoryItemsDict) + for (const auto& pair : LLLocalizedInventoryItemsDictionary::getInstanceFast()->mInventoryItemsDict) { const std::string& localized_name = pair.second; if(localized_name == name) @@ -2083,12 +2083,12 @@ BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& na // [SL:KB] - Patch: Build-ScriptRecover | Checked: 2013-03-10 (Catznip-3.4) bool LLViewerInventoryItem::lookupLocalizedName(std::string& name) { - return LLLocalizedInventoryItemsDictionary::instance().localizeInventoryObjectName(name); + return LLLocalizedInventoryItemsDictionary::instanceFast().localizeInventoryObjectName(name); } bool LLViewerInventoryItem::lookupSystemName(std::string& name) { - return LLLocalizedInventoryItemsDictionary::instance().revertInventoryObjectName(name); + return LLLocalizedInventoryItemsDictionary::instanceFast().revertInventoryObjectName(name); } // [/SL:KB] diff --git a/indra/newview/rlvactions.cpp b/indra/newview/rlvactions.cpp index 723ff97c12a6bbca77b2606364d52065a78e0372..3bab288d2b2f0763162a4129aaeb2824cb51f2d4 100644 --- a/indra/newview/rlvactions.cpp +++ b/indra/newview/rlvactions.cpp @@ -51,7 +51,7 @@ bool RlvActions::canChangeToMouselook() // User can switch to mouselook if: // - not specifically prevented from going into mouselook (NOTE: if an object has exclusive camera control only that object can prevent mouselook) // - there is no minimum camera distance defined (or it's higher than > 0m) - const RlvBehaviourModifier* pCamDistMinModifier = RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_AVDISTMIN); + const RlvBehaviourModifier* pCamDistMinModifier = RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_AVDISTMIN); return ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM)) ? !gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_MOUSELOOK) : !gRlvHandler.hasBehaviour(pCamDistMinModifier->getPrimaryObject(), RLV_BHVR_SETCAM_MOUSELOOK) ) && ( (!pCamDistMinModifier->hasValue()) || (pCamDistMinModifier->getValue<float>() == 0.f) ); @@ -158,7 +158,7 @@ static bool rlvCheckAvatarIMDistance(const LLUUID& idAvatar, ERlvBehaviourModifi // min <= max <= dist | block | allow | block | F | ^ (see above) | F // off-region | block | allow | block | F | ^ (see above) | F - const RlvBehaviourModifier *pBhvrModDistMin = RlvBehaviourDictionary::instance().getModifier(eModDistMin), *pBhvrModDistMax = RlvBehaviourDictionary::instance().getModifier(eModDistMax); + const RlvBehaviourModifier *pBhvrModDistMin = RlvBehaviourDictionary::instanceFast().getModifier(eModDistMin), *pBhvrModDistMax = RlvBehaviourDictionary::instanceFast().getModifier(eModDistMax); if (pBhvrModDistMin->hasValue()) { LLVector3d posAgent; bool fHasMax = pBhvrModDistMax->hasValue(); @@ -257,7 +257,7 @@ bool RlvActions::canShowNameTag(const LLVOAvatar* pAvatar) if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) || (gRlvHandler.isException(RLV_BHVR_SHOWNAMETAGS, pAvatar->getID())) || (gAgentID == pAvatar->getID()) ) return true; - const F32 nShowNameTagsDist = RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SHOWNAMETAGSDIST)->getValue<F32>(); + const F32 nShowNameTagsDist = RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SHOWNAMETAGSDIST)->getValue<F32>(); return (nShowNameTagsDist != 0.f) && (dist_vec_squared(pAvatar->getPositionGlobal(), gAgent.getPositionGlobal()) < nShowNameTagsDist * nShowNameTagsDist); } @@ -365,13 +365,13 @@ bool RlvActions::canTeleportToLocal(const LLVector3d& posGlobal) if ( (fCanTeleport) && (gRlvHandler.hasBehaviourExcept(RLV_BHVR_SITTP, idRlvObjExcept)) ) { const F32 nDistSq = (posGlobal - gAgent.getPositionGlobal()).lengthSquared(); - const F32 nSitTpDist = RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SITTPDIST)->getValue<F32>(); + const F32 nSitTpDist = RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SITTPDIST)->getValue<F32>(); fCanTeleport = nDistSq < nSitTpDist * nSitTpDist; } if ( (fCanTeleport) && (gRlvHandler.hasBehaviourExcept(RLV_BHVR_TPLOCAL, idRlvObjExcept)) ) { const F32 nDistSq = (LLVector2(posGlobal.mdV[0], posGlobal.mdV[1]) - LLVector2(gAgent.getPositionGlobal().mdV[0], gAgent.getPositionGlobal().mdV[1])).lengthSquared(); - const F32 nTpLocalDist = llmin(RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_TPLOCALDIST)->getValue<float>(), RLV_MODIFIER_TPLOCAL_DEFAULT); + const F32 nTpLocalDist = llmin(RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_TPLOCALDIST)->getValue<float>(), RLV_MODIFIER_TPLOCAL_DEFAULT); fCanTeleport = nDistSq < nTpLocalDist * nTpLocalDist; } return fCanTeleport; @@ -697,7 +697,7 @@ bool RlvActions::canViewWireframe() template<> const float& RlvActions::getModifierValue<float>(ERlvBehaviourModifier eBhvrMod) { - return RlvBehaviourDictionary::instance().getModifier(eBhvrMod)->getValue<float>(); + return RlvBehaviourDictionary::instanceFast().getModifier(eBhvrMod)->getValue<float>(); } // Checked: 2013-05-10 (RLVa-1.4.9) diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index 3a967d9c50375e4f00481e08002cba222755b304..7e9a6a1059c75575b1769a523c1830dc987674ae 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -760,7 +760,7 @@ bool rlvMenuEnableIfNot(const LLSD& sdParam) bool fEnable = true; if (rlv_handler_t::isEnabled()) { - ERlvBehaviour eBhvr = RlvBehaviourDictionary::instance().getBehaviourFromString(sdParam.asString(), RLV_TYPE_ADDREM); + ERlvBehaviour eBhvr = RlvBehaviourDictionary::instanceFast().getBehaviourFromString(sdParam.asString(), RLV_TYPE_ADDREM); fEnable = (eBhvr != RLV_BHVR_UNKNOWN) ? !gRlvHandler.hasBehaviour(eBhvr) : true; } return fEnable; diff --git a/indra/newview/rlvfloaters.cpp b/indra/newview/rlvfloaters.cpp index aefc2b3b2084365570bbc44aadccaa318af5e254..98c0d49ef077177f6c15a59e73f21d399453846a 100644 --- a/indra/newview/rlvfloaters.cpp +++ b/indra/newview/rlvfloaters.cpp @@ -379,7 +379,7 @@ void RlvFloaterBehaviours::refreshAll() // for (int idxModifier = 0; idxModifier < RLV_MODIFIER_COUNT; idxModifier++) { - const RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instance().m_BehaviourModifiers[idxModifier]; + const RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instanceFast().m_BehaviourModifiers[idxModifier]; if (pBhvrModifier) { sdModifierRow["enabled"] = (pBhvrModifier->hasValue()); @@ -761,7 +761,7 @@ BOOL RlvFloaterConsole::postBuild() void RlvFloaterConsole::onClose(bool fQuitting) { - RlvBehaviourDictionary::instance().clearModifiers(gAgent.getID()); + RlvBehaviourDictionary::instanceFast().clearModifiers(gAgent.getID()); gRlvHandler.processCommand(gAgent.getID(), "clear", true); } diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index 6e1b43324b16391bd82473c78fc9a393069e0add..ea3aff58ad9af1d9dd746400f5c4168c1cf6ea19 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -304,7 +304,7 @@ bool RlvHandler::isException(ERlvBehaviour eBhvr, const RlvExceptionOption& varO bool RlvHandler::isPermissive(ERlvBehaviour eBhvr) const { - return (RlvBehaviourDictionary::instance().getHasStrict(eBhvr)) + return (RlvBehaviourDictionary::instanceFast().getHasStrict(eBhvr)) ? !((hasBehaviour(RLV_BHVR_PERMISSIVE)) || (isException(RLV_BHVR_PERMISSIVE, eBhvr, ERlvExceptionCheck::Permissive))) : true; } @@ -536,7 +536,7 @@ ERlvCmdRet RlvHandler::processCommand(std::reference_wrapper<const RlvCommand> r if (0 == itObj->second.m_Commands.size()) { RLV_DEBUGS << "\t- command list empty => removing " << idCurObj << RLV_ENDL; - RlvBehaviourDictionary::instance().clearModifiers(idCurObj); + RlvBehaviourDictionary::instanceFast().clearModifiers(idCurObj); m_Objects.erase(itObj); } } @@ -1802,7 +1802,7 @@ template<> ERlvCmdRet RlvBehaviourGenericHandler<RLV_OPTION_MODIFIER>::onCommand(const RlvCommand& rlvCmd, bool& fRefCount) { // There should be an option and it should specify a valid modifier (RlvBehaviourModifier performs the appropriate type checks) - RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instance().getModifierFromBehaviour(rlvCmd.getBehaviourType()); + RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instanceFast().getModifierFromBehaviour(rlvCmd.getBehaviourType()); RlvBehaviourModifierValue modValue; if ( (!rlvCmd.hasOption()) || (!pBhvrModifier) || (!pBhvrModifier->convertOptionValue(rlvCmd.getOption(), pBhvrModifier->getType(), modValue)) ) return RLV_RET_FAILED_OPTION; @@ -1841,7 +1841,7 @@ ERlvCmdRet RlvBehaviourGenericHandler<RLV_OPTION_NONE_OR_MODIFIER>::onCommand(co } // @bhvr=n : add the default option on an empty modifier if needed - RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instance().getModifierFromBehaviour(rlvCmd.getBehaviourType()); + RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instanceFast().getModifierFromBehaviour(rlvCmd.getBehaviourType()); if ( (pBhvrModifier) && (pBhvrModifier->getAddDefault()) ) { // HACK-RLVa: reference counting doesn't happen until control returns to our caller but the modifier callbacks will happen now so we need to adjust the reference counts here @@ -2225,7 +2225,7 @@ ERlvCmdRet RlvBehaviourRecvSendStartIMHandler::onCommand(const RlvCommand& rlvCm return RLV_RET_FAILED_OPTION; } - RlvBehaviourModifier *pBhvrModDistMin = RlvBehaviourDictionary::instance().getModifier(eModDistMin), *pBhvrModDistMax = RlvBehaviourDictionary::instance().getModifier(eModDistMax); + RlvBehaviourModifier *pBhvrModDistMin = RlvBehaviourDictionary::instanceFast().getModifier(eModDistMin), *pBhvrModDistMax = RlvBehaviourDictionary::instanceFast().getModifier(eModDistMax); if (RLV_TYPE_ADD == rlvCmd.getParamType()) { pBhvrModDistMin->addValue(nDistMin * nDistMin, rlvCmd.getObjectID(), rlvCmd.getBehaviourType()); @@ -2270,9 +2270,9 @@ void RlvBehaviourCamEyeFocusOffsetHandler::onCommandToggle(ERlvBehaviour eBhvr, } else { - const RlvBehaviourModifier* pBhvrEyeOffsetModifier = RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_EYEOFFSET); - const RlvBehaviourModifier* pBhvrEyeOffsetScaleModifier = RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_EYEOFFSETSCALE); - const RlvBehaviourModifier* pBhvrFocusOffsetModifier = RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_FOCUSOFFSET); + const RlvBehaviourModifier* pBhvrEyeOffsetModifier = RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_EYEOFFSET); + const RlvBehaviourModifier* pBhvrEyeOffsetScaleModifier = RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_EYEOFFSETSCALE); + const RlvBehaviourModifier* pBhvrFocusOffsetModifier = RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_FOCUSOFFSET); if ( (!pBhvrEyeOffsetModifier->hasValue()) && (!pBhvrEyeOffsetScaleModifier->hasValue()) && (!pBhvrFocusOffsetModifier->hasValue()) ) { gRlvHandler.setCameraOverride(false); @@ -2284,7 +2284,7 @@ void RlvBehaviourCamEyeFocusOffsetHandler::onCommandToggle(ERlvBehaviour eBhvr, template<> void RlvBehaviourModifierHandler<RLV_MODIFIER_SETCAM_EYEOFFSET>::onValueChange() const { - if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_EYEOFFSET)) + if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_EYEOFFSET)) { LLControlVariable* pControl = gSavedSettings.getControl("CameraOffsetRLVaView"); if (pBhvrModifier->hasValue()) @@ -2298,7 +2298,7 @@ void RlvBehaviourModifierHandler<RLV_MODIFIER_SETCAM_EYEOFFSET>::onValueChange() template<> void RlvBehaviourModifierHandler<RLV_MODIFIER_SETCAM_EYEOFFSETSCALE>::onValueChange() const { - if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_EYEOFFSETSCALE)) + if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_EYEOFFSETSCALE)) { LLControlVariable* pControl = gSavedSettings.getControl("CameraOffsetScaleRLVa"); if (pBhvrModifier->hasValue()) @@ -2312,7 +2312,7 @@ void RlvBehaviourModifierHandler<RLV_MODIFIER_SETCAM_EYEOFFSETSCALE>::onValueCha template<> void RlvBehaviourModifierHandler<RLV_MODIFIER_SETCAM_FOCUSOFFSET>::onValueChange() const { - if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_FOCUSOFFSET)) + if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_FOCUSOFFSET)) { LLControlVariable* pControl = gSavedSettings.getControl("FocusOffsetRLVaView"); if (pBhvrModifier->hasValue()) @@ -2380,7 +2380,7 @@ void RlvBehaviourToggleHandler<RLV_BHVR_SETCAM_MOUSELOOK>::onCommandToggle(ERlvB template<> void RlvBehaviourModifierHandler<RLV_MODIFIER_SETCAM_TEXTURE>::onValueChange() const { - if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_TEXTURE)) + if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_TEXTURE)) { if (pBhvrModifier->hasValue()) { @@ -2436,16 +2436,16 @@ void RlvBehaviourToggleHandler<RLV_BHVR_SETCAM>::onCommandToggle(ERlvBehaviour e RlvBehaviourToggleHandler<RLV_BHVR_SETCAM_UNLOCK>::onCommandToggle(RLV_BHVR_SETCAM_UNLOCK, !fHasCamUnlock); gRlvHandler.setCameraOverride(fHasBhvr); - RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_AVDISTMIN)->setPrimaryObject(idRlvObject); - RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_AVDISTMAX)->setPrimaryObject(idRlvObject); - RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_ORIGINDISTMIN)->setPrimaryObject(idRlvObject); - RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_ORIGINDISTMAX)->setPrimaryObject(idRlvObject); - RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_EYEOFFSET)->setPrimaryObject(idRlvObject); - RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_EYEOFFSETSCALE)->setPrimaryObject(idRlvObject); - RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_FOCUSOFFSET)->setPrimaryObject(idRlvObject); - RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_FOVMIN)->setPrimaryObject(idRlvObject); - RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_FOVMAX)->setPrimaryObject(idRlvObject); - RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_TEXTURE)->setPrimaryObject(idRlvObject); + RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_AVDISTMIN)->setPrimaryObject(idRlvObject); + RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_AVDISTMAX)->setPrimaryObject(idRlvObject); + RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_ORIGINDISTMIN)->setPrimaryObject(idRlvObject); + RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_ORIGINDISTMAX)->setPrimaryObject(idRlvObject); + RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_EYEOFFSET)->setPrimaryObject(idRlvObject); + RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_EYEOFFSETSCALE)->setPrimaryObject(idRlvObject); + RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_FOCUSOFFSET)->setPrimaryObject(idRlvObject); + RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_FOVMIN)->setPrimaryObject(idRlvObject); + RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_FOVMAX)->setPrimaryObject(idRlvObject); + RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_TEXTURE)->setPrimaryObject(idRlvObject); } // Handles: @setdebug=n|y toggles @@ -2745,7 +2745,7 @@ ERlvCmdRet RlvForceGenericHandler<RLV_OPTION_MODIFIER>::onCommand(const RlvComma return RLV_RET_FAILED_NOBEHAVIOUR; // There should be an option and it should specify a valid modifier (RlvBehaviourModifier performs the appropriate type checks) - RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instance().getModifierFromBehaviour(rlvCmd.getBehaviourType()); + RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instanceFast().getModifierFromBehaviour(rlvCmd.getBehaviourType()); RlvBehaviourModifierValue modValue; if ( (!rlvCmd.hasOption()) || (!pBhvrModifier) || (!pBhvrModifier->convertOptionValue(rlvCmd.getOption(), pBhvrModifier->getType(), modValue)) ) return RLV_RET_FAILED_OPTION; @@ -3628,8 +3628,8 @@ ERlvCmdRet RlvReplyCamMinMaxModifierHandler::onCommand(const RlvCommand& rlvCmd, { if ( (rlvCmd.hasOption()) || (!boost::starts_with(rlvCmd.getBehaviour(), "getcam_")) ) return RLV_RET_FAILED_OPTION; - ERlvBehaviour eBhvr = RlvBehaviourDictionary::instance().getBehaviourFromString("setcam_" + rlvCmd.getBehaviour().substr(7), RLV_TYPE_ADDREM); - if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instance().getModifierFromBehaviour(eBhvr)) + ERlvBehaviour eBhvr = RlvBehaviourDictionary::instanceFast().getBehaviourFromString("setcam_" + rlvCmd.getBehaviour().substr(7), RLV_TYPE_ADDREM); + if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instanceFast().getModifierFromBehaviour(eBhvr)) strReply = (pBhvrModifier->hasValue()) ? llformat("%.3f", pBhvrModifier->getValue<float>()) : LLStringUtil::null; return RLV_RET_SUCCESS; } @@ -3643,7 +3643,7 @@ ERlvCmdRet RlvBehaviourCamZoomMinMaxHandler::onCommand(const RlvCommand& rlvCmd, if ( (rlvCmd.hasOption()) && (!RlvCommandOptionHelper::parseOption(rlvCmd.getOption(), nMult)) ) return RLV_RET_FAILED_OPTION; - RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instance().getModifier( (RLV_BHVR_CAMZOOMMIN == rlvCmd.getBehaviourType()) ? RLV_MODIFIER_SETCAM_FOVMIN : RLV_MODIFIER_SETCAM_FOVMAX); + RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instanceFast().getModifier( (RLV_BHVR_CAMZOOMMIN == rlvCmd.getBehaviourType()) ? RLV_MODIFIER_SETCAM_FOVMIN : RLV_MODIFIER_SETCAM_FOVMAX); if (pBhvrModifier) { if (RLV_TYPE_ADD == rlvCmd.getParamType()) @@ -3678,7 +3678,7 @@ ERlvCmdRet RlvReplyHandler<RLV_BHVR_GETCAM_TEXTURES>::onCommand(const RlvCommand { if (rlvCmd.hasOption()) return RLV_RET_FAILED_OPTION; - if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_TEXTURE)) + if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instanceFast().getModifier(RLV_MODIFIER_SETCAM_TEXTURE)) strReply = (pBhvrModifier->hasValue()) ? pBhvrModifier->getValue<LLUUID>().asString() : LLStringUtil::null; return RLV_RET_SUCCESS; } @@ -3707,7 +3707,7 @@ ERlvCmdRet RlvReplyHandler<RLV_BHVR_GETCOMMAND>::onCommand(const RlvCommand& rlv } std::list<std::string> cmdList; - if (RlvBehaviourDictionary::instance().getCommands((optionList.size() >= 1) ? optionList[0] : LLStringUtil::null, eType, cmdList)) + if (RlvBehaviourDictionary::instanceFast().getCommands((optionList.size() >= 1) ? optionList[0] : LLStringUtil::null, eType, cmdList)) strReply = boost::algorithm::join(cmdList, (optionList.size() >= 3) ? optionList[2] : std::string(RLV_OPTION_SEPARATOR) ); return RLV_RET_SUCCESS; } diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp index 667b300c9a3b530859e004de63cc49a1c0e379f9..033fd4b941746a71f028b83d5279bbfc041af18b 100644 --- a/indra/newview/rlvhelper.cpp +++ b/indra/newview/rlvhelper.cpp @@ -739,7 +739,7 @@ RlvCommand::RlvCommand(const LLUUID& idObj, const std::string& strCommand) return; } - m_pBhvrInfo = RlvBehaviourDictionary::instance().getBehaviourInfo(m_strBehaviour, m_eParamType, &m_fStrict, &m_eBhvrModifier); + m_pBhvrInfo = RlvBehaviourDictionary::instanceFast().getBehaviourInfo(m_strBehaviour, m_eParamType, &m_fStrict, &m_eBhvrModifier); } RlvCommand::RlvCommand(const RlvCommand& rlvCmd, ERlvParamType eParamType) @@ -1201,7 +1201,7 @@ std::string RlvObject::getStatusString(const std::string& strFilter, const std:: void RlvObject::clearModifiers(ERlvBehaviour eBhvr) { - if (const RlvBehaviourInfo* pBhvrInfo = RlvBehaviourDictionary::instance().getBehaviourInfo(eBhvr, RLV_TYPE_ADDREM)) + if (const RlvBehaviourInfo* pBhvrInfo = RlvBehaviourDictionary::instanceFast().getBehaviourInfo(eBhvr, RLV_TYPE_ADDREM)) { for (const auto& modifierEntry : pBhvrInfo->getModifiers()) { diff --git a/indra/newview/rlvmodifiers.h b/indra/newview/rlvmodifiers.h index 374ef585670532f73c0ddc4ee37e2c670ec23dcf..a1c328fc3adc2d166c80232e15e3af72283d27db 100644 --- a/indra/newview/rlvmodifiers.h +++ b/indra/newview/rlvmodifiers.h @@ -85,7 +85,7 @@ class RlvBehaviourModifierCache : public LLRefCount, public LLInstanceTracker<Rl RlvBehaviourModifierCache(ERlvBehaviourModifier eModifier) : LLInstanceTracker<RlvBehaviourModifierCache<T>, ERlvBehaviourModifier>(eModifier) { - if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instance().getModifier(eModifier)) + if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instanceFast().getModifier(eModifier)) { mConnection = pBhvrModifier->getSignal().connect(boost::bind(&RlvBehaviourModifierCache<T>::handleValueChange, this, _1)); mCachedValue = pBhvrModifier->getValue<T>();