diff options
author | James Cook <james@lindenlab.com> | 2010-05-18 16:00:45 -0700 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-05-18 16:00:45 -0700 |
commit | f4148502e484d516b42c4a88603eee6889d45697 (patch) | |
tree | a7d049b1fb1ebb037c0d9c90202a6b2ffe9e86c1 /indra/llcommon | |
parent | 8238a377bd0e28303506446f2c7806b9632f3897 (diff) |
Rename mSLID to mUsername to match the name of the field in the UI
Product made a late-breaking request to change the name of this
field. The wire protocol for People API has not yet changed.
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/llavatarname.cpp | 16 | ||||
-rw-r--r-- | indra/llcommon/llavatarname.h | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp index 7415acadd4..de51a7f2aa 100644 --- a/indra/llcommon/llavatarname.cpp +++ b/indra/llcommon/llavatarname.cpp @@ -46,7 +46,7 @@ static const std::string IS_DISPLAY_NAME_DEFAULT("is_display_name_default"); static const std::string DISPLAY_NAME_EXPIRES("display_name_expires"); LLAvatarName::LLAvatarName() -: mSLID(), +: mUsername(), mDisplayName(), mIsDisplayNameDefault(false), mIsDummy(false), @@ -55,16 +55,18 @@ LLAvatarName::LLAvatarName() bool LLAvatarName::operator<(const LLAvatarName& rhs) const { - if (mSLID == rhs.mSLID) + if (mUsername == rhs.mUsername) return mDisplayName < rhs.mDisplayName; else - return mSLID < rhs.mSLID; + return mUsername < rhs.mUsername; } LLSD LLAvatarName::asLLSD() const { LLSD sd; - sd[SL_ID] = mSLID; + // Due to a late-breaking change request from Product, we renamed + // "SLID" to "Username", but it was too late to change the wire format. + sd[SL_ID] = mUsername; sd[DISPLAY_NAME] = mDisplayName; sd[IS_DISPLAY_NAME_DEFAULT] = mIsDisplayNameDefault; sd[DISPLAY_NAME_EXPIRES] = LLDate(mExpires); @@ -73,7 +75,7 @@ LLSD LLAvatarName::asLLSD() const void LLAvatarName::fromLLSD(const LLSD& sd) { - mSLID = sd[SL_ID].asString(); + mUsername = sd[SL_ID].asString(); // see asLLSD() above mDisplayName = sd[DISPLAY_NAME].asString(); mIsDisplayNameDefault = sd[IS_DISPLAY_NAME_DEFAULT].asBoolean(); LLDate expires = sd[DISPLAY_NAME_EXPIRES]; @@ -83,9 +85,9 @@ void LLAvatarName::fromLLSD(const LLSD& sd) std::string LLAvatarName::getNameAndSLID() const { std::string name; - if (!mSLID.empty()) + if (!mUsername.empty()) { - name = mDisplayName + " (" + mSLID + ")"; + name = mDisplayName + " (" + mUsername + ")"; } else { diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h index 87750210c6..39071ec4c7 100644 --- a/indra/llcommon/llavatarname.h +++ b/indra/llcommon/llavatarname.h @@ -54,7 +54,7 @@ public: std::string getNameAndSLID() const; // "bobsmith123" or "james.linden", US-ASCII only - std::string mSLID; + std::string mUsername; // "Jose' Sanchez" or "James Linden", UTF-8 encoded Unicode // Contains data whether or not user has explicitly set |