diff options
author | Oz Linden <oz@lindenlab.com> | 2011-01-15 09:09:41 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-01-15 09:09:41 -0500 |
commit | c5d8624ba4fb303ad534a0bb9258c89cafe77303 (patch) | |
tree | 0af26a06f306f9f7d9ed66c6e6e49cc389b081ee /indra | |
parent | 903f6269352d2b97d916a92c31d3f3b9568407f3 (diff) |
renamed temp name flag member in name cache to avoid confusion with similar names in other classes
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llavatarname.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/llavatarname.h | 2 | ||||
-rw-r--r-- | indra/llmessage/llavatarnamecache.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 28 |
4 files changed, 19 insertions, 25 deletions
diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp index b1ec9e9875..ad1845d387 100644 --- a/indra/llcommon/llavatarname.cpp +++ b/indra/llcommon/llavatarname.cpp @@ -48,7 +48,7 @@ LLAvatarName::LLAvatarName() mLegacyFirstName(), mLegacyLastName(), mIsDisplayNameDefault(false), - mIsDummy(false), + mIsTemporaryName(false), mExpires(F64_MAX), mNextUpdate(0.0) { } diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 145aeccd35..ba258d6d52 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -79,7 +79,7 @@ public: // Under error conditions, we may insert "dummy" records with // names like "???" into caches as placeholders. These can be // shown in UI, but are not serialized. - bool mIsDummy; + bool mIsTemporaryName; // Names can change, so need to keep track of when name was // last checked. diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 03c28eb2a5..d9cb83c089 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -220,7 +220,7 @@ public: av_name.mUsername = DUMMY_NAME; av_name.mDisplayName = DUMMY_NAME; av_name.mIsDisplayNameDefault = false; - av_name.mIsDummy = true; + av_name.mIsTemporaryName = true; av_name.mExpires = expires; it = unresolved_agents.beginArray(); @@ -449,7 +449,7 @@ void LLAvatarNameCache::exportFile(std::ostream& ostr) { const LLUUID& agent_id = it->first; const LLAvatarName& av_name = it->second; - if (!av_name.mIsDummy) + if (!av_name.mIsTemporaryName) { // key must be a string agents[agent_id.asString()] = av_name.asLLSD(); @@ -490,12 +490,6 @@ void LLAvatarNameCache::idle() // this way first synchronous get call on an expired entry won't return // legacy name. LF - //const F32 ERASE_EXPIRED_TIMEOUT = 60.f; // seconds - //if (sEraseExpiredTimer.checkExpirationAndReset(ERASE_EXPIRED_TIMEOUT)) - //{ - // eraseExpired(); - //} - if (sAskQueue.empty()) { return; @@ -550,7 +544,7 @@ void LLAvatarNameCache::buildLegacyName(const std::string& full_name, av_name->mUsername = ""; av_name->mDisplayName = full_name; av_name->mIsDisplayNameDefault = true; - av_name->mIsDummy = true; + av_name->mIsTemporaryName = true; av_name->mExpires = F64_MAX; } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ce305dcd89..9623554200 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -279,20 +279,20 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& void LLIMModel::LLIMSession::onAdHocNameCache(const LLAvatarName& av_name) { - if (av_name.mIsDummy) - {
- S32 separator_index = mName.rfind(" ");
- std::string name = mName.substr(0, separator_index);
- ++separator_index;
- std::string conference_word = mName.substr(separator_index, mName.length());
-
- // additional check that session name is what we expected
- if ("Conference" == conference_word)
- {
- LLStringUtil::format_map_t args;
- args["[AGENT_NAME]"] = name;
- LLTrans::findString(mName, "conference-title-incoming", args);
- }
+ if (av_name.mIsTemporaryName) + { + S32 separator_index = mName.rfind(" "); + std::string name = mName.substr(0, separator_index); + ++separator_index; + std::string conference_word = mName.substr(separator_index, mName.length()); + + // additional check that session name is what we expected + if ("Conference" == conference_word) + { + LLStringUtil::format_map_t args; + args["[AGENT_NAME]"] = name; + LLTrans::findString(mName, "conference-title-incoming", args); + } } else { |