summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llavatarname.cpp10
-rw-r--r--indra/llcommon/llavatarname.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp
index 62ba7cb112..c35b8380b8 100644
--- a/indra/llcommon/llavatarname.cpp
+++ b/indra/llcommon/llavatarname.cpp
@@ -35,12 +35,15 @@
#include "llavatarname.h"
+#include "lldate.h"
+#include "llsd.h"
+
// Store these in pre-built std::strings to avoid memory allocations in
// LLSD map lookups
static const std::string SL_ID("sl_id");
static const std::string DISPLAY_NAME("display_name");
static const std::string IS_DISPLAY_NAME_DEFAULT("is_display_name_default");
-static const std::string EXPIRES("expires");
+static const std::string DISPLAY_NAME_EXPIRES("display_name_expires");
LLAvatarName::LLAvatarName()
: mSLID(),
@@ -64,7 +67,7 @@ LLSD LLAvatarName::asLLSD() const
sd[SL_ID] = mSLID;
sd[DISPLAY_NAME] = mDisplayName;
sd[IS_DISPLAY_NAME_DEFAULT] = mIsDisplayNameDefault;
- sd[EXPIRES] = mExpires;
+ sd[DISPLAY_NAME_EXPIRES] = LLDate(mExpires);
return sd;
}
@@ -73,5 +76,6 @@ void LLAvatarName::fromLLSD(const LLSD& sd)
mSLID = sd[SL_ID].asString();
mDisplayName = sd[DISPLAY_NAME].asString();
mIsDisplayNameDefault = sd[IS_DISPLAY_NAME_DEFAULT].asBoolean();
- mExpires = sd[EXPIRES].asReal();
+ LLDate expires = sd[DISPLAY_NAME_EXPIRES];
+ mExpires = expires.secondsSinceEpoch();
}
diff --git a/indra/llcommon/llavatarname.h b/indra/llcommon/llavatarname.h
index 11bd5f30b7..b30dca6e6e 100644
--- a/indra/llcommon/llavatarname.h
+++ b/indra/llcommon/llavatarname.h
@@ -63,7 +63,7 @@ public:
// Names can change, so need to keep track of when name was
// last checked.
- // Unix time-from-epoch seconds
+ // Unix time-from-epoch seconds for efficiency
F64 mExpires;
// Can be a viewer UI image name ("Person_Check") or a server-side