summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authornat-goodspeed <nat@lindenlab.com>2024-06-04 14:53:57 -0400
committerGitHub <noreply@github.com>2024-06-04 14:53:57 -0400
commitb0f5401adb755b305669b16d6589639f79721626 (patch)
treed38f28d6d45835a7889438bb1fe1035049d8bedb /indra/newview/llappearancemgr.cpp
parent316bc0bdf30514a0c6894ef7c2859e79bf02a546 (diff)
parent9e6cf32add0a857b4e28c638bd378a8d3f70fcdb (diff)
Merge pull request #1555 from secondlife/lua-timers
Add timer support to the Lua viewer
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp27
1 files changed, 8 insertions, 19 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 97e1c1e6ee..30f07a873b 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -118,26 +118,16 @@ public:
LLOutfitUnLockTimer(F32 period) : LLEventTimer(period)
{
// restart timer on BOF changed event
- LLOutfitObserver::instance().addBOFChangedCallback(boost::bind(
- &LLOutfitUnLockTimer::reset, this));
+ LLOutfitObserver::instance().addBOFChangedCallback([this]{ start(); });
stop();
}
- /*virtual*/
- BOOL tick()
+ bool tick() override
{
- if(mEventTimer.hasExpired())
- {
- LLAppearanceMgr::instance().setOutfitLocked(false);
- }
- return FALSE;
+ LLAppearanceMgr::instance().setOutfitLocked(false);
+ return false;
}
- void stop() { mEventTimer.stop(); }
- void start() { mEventTimer.start(); }
- void reset() { mEventTimer.reset(); }
- BOOL getStarted() { return mEventTimer.getStarted(); }
-
- LLTimer& getEventTimer() { return mEventTimer;}
+ bool getStarted() { return isRunning(); }
};
// support for secondlife:///app/appearance SLapps
@@ -332,7 +322,7 @@ public:
// virtual
// Will be deleted after returning true - only safe to do this if all callbacks have fired.
- BOOL tick()
+ bool tick() override
{
// mPendingRequests will be zero if all requests have been
// responded to. mWaitTimes.empty() will be true if we have
@@ -625,8 +615,8 @@ void LLBrokenLinkObserver::changed(U32 mask)
if (id == mUUID)
{
// Might not be processed yet and it is not a
- // good idea to update appearane here, postpone.
- doOnIdleOneTime([this]()
+ // good idea to update appearance here, postpone.
+ doOnIdleOneTime([this]
{
postProcess();
});
@@ -1712,7 +1702,6 @@ void LLAppearanceMgr::setOutfitLocked(bool locked)
mOutfitLocked = locked;
if (locked)
{
- mUnlockOutfitTimer->reset();
mUnlockOutfitTimer->start();
}
else