diff options
| author | Rider Linden <rider@lindenlab.com> | 2017-11-27 10:19:43 -0800 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2017-11-27 10:19:43 -0800 |
| commit | 66ba27cb91b4f81625b8ab535f41bcf38a2aae99 (patch) | |
| tree | a542d46607c4360a1648fd53c8dbe03f4690a9a7 /indra/newview | |
| parent | 0bf6386c61c0c28b298c2cccd82c786f754024af (diff) | |
Added boost::hash<> spec for LLSD
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llsettingsbase.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llsettingsbase.h | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llsettingsbase.cpp b/indra/newview/llsettingsbase.cpp index 904d0dd07c..e36c6d4a84 100644 --- a/indra/newview/llsettingsbase.cpp +++ b/indra/newview/llsettingsbase.cpp @@ -48,13 +48,15 @@ const F32Seconds LLSettingsBlender::DEFAULT_THRESHOLD(0.01); //========================================================================= LLSettingsBase::LLSettingsBase(): mSettings(LLSD::emptyMap()), - mDirty(true) + mDirty(true), + mHashValue(0) { } LLSettingsBase::LLSettingsBase(const LLSD setting) : mSettings(setting), - mDirty(true) + mDirty(true), + mHashValue(0) { } diff --git a/indra/newview/llsettingsbase.h b/indra/newview/llsettingsbase.h index d32fcb26e8..d304b8702a 100644 --- a/indra/newview/llsettingsbase.h +++ b/indra/newview/llsettingsbase.h @@ -67,6 +67,11 @@ public: inline bool isDirty() const { return mDirty; } inline void setDirtyFlag(bool dirty) { mDirty = dirty; } + inline size_t getHash() const + { + return boost::hash<LLSD>{}(mSettings); + } + inline LLUUID getId() const { return getValue(SETTING_ID).asUUID(); @@ -227,6 +232,7 @@ protected: private: bool mDirty; + size_t mHashValue; LLSD combineSDMaps(const LLSD &first, const LLSD &other) const; |
