diff --git a/indra/newview/llexperiencelog.cpp b/indra/newview/llexperiencelog.cpp index dd4027932..57f1483e9 100644 --- a/indra/newview/llexperiencelog.cpp +++ b/indra/newview/llexperiencelog.cpp @@ -36,7 +36,7 @@ #include "lldate.h" -class LLExperienceLogDispatchHandler : public LLDispatchHandler +class LLExperienceLogDispatchHandler final : public LLDispatchHandler { public: bool operator()( @@ -225,13 +225,14 @@ LLExperienceLog::~LLExperienceLog() void LLExperienceLog::eraseExpired() { + const auto& inst(*this); // Fixes Linux std::vector expired; std::for_each(mEvents.beginMap(), mEvents.endMap(), [&](const auto& event_pair) { const std::string& date = event_pair.first; - if (isExpired(date)) - { + if (inst.isExpired(date)) + { expired.push_back(date); } }); @@ -242,7 +243,7 @@ void LLExperienceLog::eraseExpired() } } -bool LLExperienceLog::isExpired(const std::string& date) +bool LLExperienceLog::isExpired(const std::string& date) const { S32 month, day, year = 0; S32 matched = sscanf(date.c_str(), "%d-%d-%d", &year, &month, &day); diff --git a/indra/newview/llexperiencelog.h b/indra/newview/llexperiencelog.h index 7da2057b6..27012898c 100644 --- a/indra/newview/llexperiencelog.h +++ b/indra/newview/llexperiencelog.h @@ -61,7 +61,7 @@ public: static void notify(LLSD& message); static std::string getFilename(); static std::string getPermissionString(const LLSD& message, const std::string& base); - bool isExpired(const std::string& date); + bool isExpired(const std::string& date) const; protected: void handleExperienceMessage(LLSD& message);