diff options
23 files changed, 142 insertions, 103 deletions
diff --git a/indra/llcommon/llcallbacklist.cpp b/indra/llcommon/llcallbacklist.cpp index 7f7fdc7370..85c73fec8f 100644 --- a/indra/llcommon/llcallbacklist.cpp +++ b/indra/llcommon/llcallbacklist.cpp @@ -130,22 +130,40 @@ LLCallbackList::handle_t LLCallbackList::doOnIdleRepeating( const bool_func_t& f *****************************************************************************/ LLLater::LLLater() {} -// Call a given callable once at specified timestamp. -LLLater::handle_t LLLater::doAtTime(nullary_func_t callable, LLDate::timestamp time) +LLLater::DoneMap::iterator LLLater::doAtTime1(LLDate::timestamp time) { - bool first{ mQueue.empty() }; // Pick token FIRST to store a self-reference in mQueue's managed node as // well as in mHandles. Pre-increment to distinguish 0 from any live // handle_t. token_t token{ ++mToken }; - auto handle{ mQueue.emplace(callable, time, token) }; - mHandles.emplace(token, handle); + auto [iter, inserted]{ mDoneTimes.emplace(token, time) }; + llassert(inserted); + return iter; +} + +LLLater::handle_t LLLater::doAtTime2(nullary_func_t callable, DoneMap::iterator iter) +{ + bool first{ mQueue.empty() }; + // DoneMap::iterator references (token, time) pair + auto handle{ mQueue.emplace(callable, iter->first, iter->second) }; + auto hiter{ mHandles.emplace(iter->first, handle).first }; + // When called by Periodic, we're passed an existing DoneMap entry, + // meaning the token already exists, meaning emplace() will tell us it + // found an existing entry rather than creating a new one. In that case, + // it's essential to update the handle. + hiter->second = handle; if (first) { // If this is our first entry, register for regular callbacks. mLive = LLCallbackList::instance().doOnIdleRepeating([this]{ return tick(); }); } - return handle_t{ token }; + return { iter->first }; +} + +// Call a given callable once at specified timestamp. +LLLater::handle_t LLLater::doAtTime(nullary_func_t callable, LLDate::timestamp time) +{ + return doAtTime2(callable, doAtTime1(time)); } // Call a given callable once after specified interval. @@ -160,11 +178,11 @@ LLLater::handle_t LLLater::doAfterInterval(nullary_func_t callable, F32 seconds) // For doPeriodically(), we need a struct rather than a lambda because a // struct, unlike a lambda, has access to 'this'. -struct Periodic +struct LLLater::Periodic { LLLater* mLater; + DoneMap::iterator mDone; bool_func_t mCallable; - LLDate::timestamp mNext; F32 mSeconds; void operator()() @@ -175,8 +193,9 @@ struct Periodic // Don't call doAfterInterval(), which rereads LLDate::now(), // since that would defer by however long it took us to wake // up and notice plus however long callable() took to run. - mNext += mSeconds; - mLater->doAtTime(*this, mNext); + // Bump our mDoneTimes entry so getRemaining() can track. + mDone->second += mSeconds; + mLater->doAtTime2(*this, mDone); } } }; @@ -186,17 +205,32 @@ LLLater::handle_t LLLater::doPeriodically(bool_func_t callable, F32 seconds) { // Passing seconds <= 0 will produce an infinite loop. llassert(seconds > 0); - auto next{ LLDate::now().secondsSinceEpoch() + seconds }; - return doAtTime(Periodic{ this, callable, next, seconds }, next); + auto iter{ doAtTime1(LLDate::now().secondsSinceEpoch() + seconds) }; + // The whole reason we split doAtTime() into doAtTime1() and doAtTime2() + // is to be able to bind the mDoneTimes entry into Periodic. + return doAtTime2(Periodic{ this, iter, callable, seconds }, iter); } -bool LLLater::isRunning(handle_t timer) +bool LLLater::isRunning(handle_t timer) const { // A default-constructed timer isn't running. // A timer we don't find in mHandles has fired or been canceled. return timer && mHandles.find(timer.token) != mHandles.end(); } +F32 LLLater::getRemaining(handle_t timer) const +{ + auto found{ mDoneTimes.find(timer.token) }; + if (found == mDoneTimes.end()) + { + return 0.f; + } + else + { + return found->second - LLDate::now().secondsSinceEpoch(); + } +} + // Cancel a future timer set by doAtTime(), doAfterInterval(), doPeriodically() bool LLLater::cancel(handle_t& timer) { @@ -240,6 +274,8 @@ bool LLLater::cancel(const handle_t& timer) mQueue.erase(found->second); // before erasing timer.token from mHandles mHandles.erase(found); + // don't forget to erase mDoneTimes entry + mDoneTimes.erase(timer.token); if (mQueue.empty()) { // If that was the last active timer, unregister for callbacks. @@ -282,6 +318,8 @@ bool LLLater::tick() auto current{ top }; // remove the mHandles entry referencing this task mHandles.erase(current.mToken); + // and the mDoneTimes entry + mDoneTimes.erase(current.mToken); // before removing the mQueue task entry itself mQueue.pop(); // okay, NOW run diff --git a/indra/llcommon/llcallbacklist.h b/indra/llcommon/llcallbacklist.h index 522a9b838b..17adb7f431 100644 --- a/indra/llcommon/llcallbacklist.h +++ b/indra/llcommon/llcallbacklist.h @@ -114,13 +114,13 @@ class LLLater: public LLSingleton<LLLater> struct func_at { nullary_func_t mFunc; - LLDate::timestamp mTime; token_t mToken; + LLDate::timestamp mTime; - func_at(const nullary_func_t& func, LLDate::timestamp tm, token_t token): + func_at(const nullary_func_t& func, token_t token, LLDate::timestamp tm): mFunc(func), - mTime(tm), - mToken(token) + mToken(token), + mTime(tm) {} friend bool operator<(const func_at& lhs, const func_at& rhs) @@ -165,7 +165,9 @@ public: handle_t doPeriodically(bool_func_t callable, F32 seconds); // test whether specified handle is still live - bool isRunning(handle_t timer); + bool isRunning(handle_t timer) const; + // check remaining time + F32 getRemaining(handle_t timer) const; // Cancel a future timer set by doAtTime(), doAfterInterval(), doPeriodically(). // Return true iff the handle corresponds to a live timer. @@ -239,10 +241,19 @@ private: // the heap aka priority queue queue_t mQueue; // handles we've returned that haven't yet canceled - std::unordered_map<token_t, queue_t::handle_type> mHandles; + using HandleMap = std::unordered_map<token_t, queue_t::handle_type>; + HandleMap mHandles; + using DoneMap = std::unordered_map<token_t, LLDate::timestamp>; + DoneMap mDoneTimes; token_t mToken{ 0 }; // While mQueue is non-empty, register for regular callbacks. LLCallbackList::temp_handle_t mLive; + + struct Periodic; + + // internal implementation for doAtTime() + DoneMap::iterator doAtTime1(LLDate::timestamp time); + handle_t doAtTime2(nullary_func_t callable, DoneMap::iterator iter); }; /*-------------------- legacy names in global namespace --------------------*/ diff --git a/indra/llcommon/lleventtimer.cpp b/indra/llcommon/lleventtimer.cpp index b163ad375c..0f8d1e636f 100644 --- a/indra/llcommon/lleventtimer.cpp +++ b/indra/llcommon/lleventtimer.cpp @@ -56,3 +56,13 @@ void LLEventTimer::stop() { LLLater::instance().cancel(mTimer); } + +bool LLEventTimer::isRunning() +{ + return LLLater::instance().isRunning(mTimer); +} + +F32 LLEventTimer::getRemaining() +{ + return LLLater::instance().getRemaining(mTimer); +} diff --git a/indra/llcommon/lleventtimer.h b/indra/llcommon/lleventtimer.h index 34ff157e22..05d8bc038d 100644 --- a/indra/llcommon/lleventtimer.h +++ b/indra/llcommon/lleventtimer.h @@ -42,6 +42,8 @@ public: void start(); void stop(); + bool isRunning(); + F32 getRemaining(); //function to be called at the supplied frequency // Normally return false; true will delete the timer after the function returns. diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 7e84ad3b2a..5b8835add8 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -118,25 +118,19 @@ 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(); } 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(); } +// void reset() { mEventTimer.reset(); } + bool getStarted() { return isRunning(); } - LLTimer& getEventTimer() { return mEventTimer;} +// LLTimer& getEventTimer() { return mEventTimer;} }; // support for secondlife:///app/appearance SLapps @@ -1706,7 +1700,6 @@ void LLAppearanceMgr::setOutfitLocked(bool locked) mOutfitLocked = locked; if (locked) { - mUnlockOutfitTimer->reset(); mUnlockOutfitTimer->start(); } else diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d6a4c41497..0200ea6ad7 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4586,7 +4586,7 @@ static LLTrace::BlockTimerStatHandle FTM_HUD_EFFECTS("HUD Effects"); /////////////////////////////////////////////////////// void LLAppViewer::idle() { - LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; + LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; pingMainloopTimeout("Main:Idle"); // Update frame timers @@ -4594,8 +4594,7 @@ void LLAppViewer::idle() LLFrameTimer::updateFrameTime(); LLFrameTimer::updateFrameCount(); - LLEventTimer::updateClass(); - LLPerfStats::updateClass(); + LLPerfStats::updateClass(); // LLApp::stepFrame() performs the above three calls plus mRunner.run(). // Not sure why we don't call stepFrame() here, except that LLRunner seems @@ -4607,7 +4606,7 @@ void LLAppViewer::idle() LLDirPickerThread::clearDead(); F32 dt_raw = idle_timer.getElapsedTimeAndResetF32(); - LLGLTFMaterialList::flushUpdates(); + LLGLTFMaterialList::flushUpdates(); // Service the WorkQueue we use for replies from worker threads. // Use function statics for the timeslice setting so we only have to fetch diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp index 4d9ef99319..93a0ef0e82 100644 --- a/indra/newview/lldonotdisturbnotificationstorage.cpp +++ b/indra/newview/lldonotdisturbnotificationstorage.cpp @@ -55,7 +55,7 @@ LLDoNotDisturbNotificationStorageTimer::~LLDoNotDisturbNotificationStorageTimer( } -BOOL LLDoNotDisturbNotificationStorageTimer::tick() +bool LLDoNotDisturbNotificationStorageTimer::tick() { LLDoNotDisturbNotificationStorage * doNotDisturbNotificationStorage = LLDoNotDisturbNotificationStorage::getInstance(); @@ -64,7 +64,7 @@ BOOL LLDoNotDisturbNotificationStorageTimer::tick() { doNotDisturbNotificationStorage->saveNotifications(); } - return FALSE; + return false; } LLDoNotDisturbNotificationStorage::LLDoNotDisturbNotificationStorage() diff --git a/indra/newview/llfloaterlinkreplace.cpp b/indra/newview/llfloaterlinkreplace.cpp index b42c49c607..0bc3c241fa 100644 --- a/indra/newview/llfloaterlinkreplace.cpp +++ b/indra/newview/llfloaterlinkreplace.cpp @@ -45,7 +45,7 @@ LLFloaterLinkReplace::LLFloaterLinkReplace(const LLSD& key) mTargetUUID(LLUUID::null), mBatchSize(gSavedSettings.getU32("LinkReplaceBatchSize")) { - mEventTimer.stop(); + stop(); } LLFloaterLinkReplace::~LLFloaterLinkReplace() @@ -202,7 +202,7 @@ void LLFloaterLinkReplace::onStartClickedResponse(const LLSD& notification, cons mStartBtn->setEnabled(FALSE); mRefreshBtn->setEnabled(FALSE); - mEventTimer.start(); + start(); tick(); } else @@ -298,7 +298,7 @@ void LLFloaterLinkReplace::decreaseOpenItemCount() mStatusText->setText(getString("ReplaceFinished")); mStartBtn->setEnabled(TRUE); mRefreshBtn->setEnabled(TRUE); - mEventTimer.stop(); + stop(); LL_INFOS() << "Inventory link replace finished." << LL_ENDL; } else @@ -310,7 +310,7 @@ void LLFloaterLinkReplace::decreaseOpenItemCount() } } -BOOL LLFloaterLinkReplace::tick() +bool LLFloaterLinkReplace::tick() { LL_DEBUGS() << "Calling tick - remaining items = " << mRemainingInventoryItems.size() << LL_ENDL; @@ -320,7 +320,7 @@ BOOL LLFloaterLinkReplace::tick() { if (!mRemainingInventoryItems.size()) { - mEventTimer.stop(); + stop(); break; } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 34dc263519..d9f7f0a171 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1947,7 +1947,7 @@ public: :LLEventTimer(period), mCallback(cb) { - mEventTimer.stop(); + stop(); } virtual ~Updater(){} @@ -1955,7 +1955,7 @@ public: void update(const LLSD& new_value) { mNewValue = new_value; - mEventTimer.start(); + start(); } protected: @@ -1963,9 +1963,9 @@ protected: bool tick() override { mCallback(mNewValue); - mEventTimer.stop(); + stop(); - return FALSE; + return false; } private: diff --git a/indra/newview/llfloaterregionrestarting.cpp b/indra/newview/llfloaterregionrestarting.cpp index 95d4265bb4..6817cce5f6 100644 --- a/indra/newview/llfloaterregionrestarting.cpp +++ b/indra/newview/llfloaterregionrestarting.cpp @@ -74,11 +74,11 @@ void LLFloaterRegionRestarting::regionChange() close(); } -BOOL LLFloaterRegionRestarting::tick() +bool LLFloaterRegionRestarting::tick() { refresh(); - return FALSE; + return false; } void LLFloaterRegionRestarting::refresh() diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 6da380c639..74b6218b46 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -355,7 +355,7 @@ LLFadeEventTimer::LLFadeEventTimer(F32 refresh, LLGUIPreviewLiveFile* parent) } // Single tick of fade event timer: increment the color -BOOL LLFadeEventTimer::tick() +bool LLFadeEventTimer::tick() { float diff = 0.04f; if(TRUE == mFadingOut) // set fade for in/out color direction @@ -365,7 +365,7 @@ BOOL LLFadeEventTimer::tick() if(NULL == mParent) // no more need to tick, so suicide { - return TRUE; + return true; } // Set up colors @@ -388,7 +388,7 @@ BOOL LLFadeEventTimer::tick() mFadingOut = FALSE; } - return FALSE; + return false; } // Constructor diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ce4a032b27..0144f13f24 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -99,16 +99,16 @@ const LLUUID LLOutgoingCallDialog::OCD_KEY = LLUUID("7CF78E11-0CFE-498D-ADB9-141 LLIMMgr* gIMMgr = NULL; -BOOL LLSessionTimeoutTimer::tick() +bool LLSessionTimeoutTimer::tick() { - if (mSessionId.isNull()) return TRUE; + if (mSessionId.isNull()) return true; LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionId); if (session && !session->mSessionInitialized) { gIMMgr->showSessionStartError("session_initialization_timed_out_error", mSessionId); } - return TRUE; + return true; } diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 1e42773777..60edbfee88 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -996,23 +996,18 @@ LLLocalBitmapTimer::~LLLocalBitmapTimer() void LLLocalBitmapTimer::startTimer() { - mEventTimer.start(); + start(); } void LLLocalBitmapTimer::stopTimer() { - mEventTimer.stop(); + stop(); } -bool LLLocalBitmapTimer::isRunning() -{ - return mEventTimer.getStarted(); -} - -BOOL LLLocalBitmapTimer::tick() +bool LLLocalBitmapTimer::tick() { LLLocalBitmapMgr::getInstance()->doUpdates(); - return FALSE; + return false; } /*=======================================*/ diff --git a/indra/newview/lllocalbitmaps.h b/indra/newview/lllocalbitmaps.h index 8420049b1e..96a39a3d66 100644 --- a/indra/newview/lllocalbitmaps.h +++ b/indra/newview/lllocalbitmaps.h @@ -120,7 +120,6 @@ class LLLocalBitmapTimer : public LLEventTimer public: void startTimer(); void stopTimer(); - bool isRunning(); bool tick() override; }; diff --git a/indra/newview/lllocalgltfmaterials.cpp b/indra/newview/lllocalgltfmaterials.cpp index 61e0163798..91753349c8 100644 --- a/indra/newview/lllocalgltfmaterials.cpp +++ b/indra/newview/lllocalgltfmaterials.cpp @@ -288,24 +288,19 @@ LLLocalGLTFMaterialTimer::~LLLocalGLTFMaterialTimer() void LLLocalGLTFMaterialTimer::startTimer() { - mEventTimer.start(); + start(); } void LLLocalGLTFMaterialTimer::stopTimer() { - mEventTimer.stop(); + stop(); } -bool LLLocalGLTFMaterialTimer::isRunning() -{ - return mEventTimer.getStarted(); -} - -BOOL LLLocalGLTFMaterialTimer::tick() +bool LLLocalGLTFMaterialTimer::tick() { // todo: do on idle? No point in timer LLLocalGLTFMaterialMgr::getInstance()->doUpdates(); - return FALSE; + return false; } /*=======================================*/ diff --git a/indra/newview/lllocalgltfmaterials.h b/indra/newview/lllocalgltfmaterials.h index 53639dfb1d..ff54d48602 100644 --- a/indra/newview/lllocalgltfmaterials.h +++ b/indra/newview/lllocalgltfmaterials.h @@ -89,7 +89,6 @@ public: public: void startTimer(); void stopTimer(); - bool isRunning(); bool tick() override; }; diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index d3b981e205..5bf587292d 100644 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -418,10 +418,10 @@ LLMediaDataClient::QueueTimer::QueueTimer(F32 time, LLMediaDataClient *mdc) } // virtual -BOOL LLMediaDataClient::QueueTimer::tick() +bool LLMediaDataClient::QueueTimer::tick() { - BOOL result = TRUE; - + bool result = TRUE; + if (!mMDC.isNull()) { result = mMDC->processQueueTimer(); @@ -451,7 +451,7 @@ LLMediaDataClient::RetryTimer::RetryTimer(F32 time, Request::ptr_t request) } // virtual -BOOL LLMediaDataClient::RetryTimer::tick() +bool LLMediaDataClient::RetryTimer::tick() { mRequest->stopTracking(); @@ -464,12 +464,12 @@ BOOL LLMediaDataClient::RetryTimer::tick() LL_INFOS("LLMediaDataClient") << "RetryTimer fired for: " << *mRequest << ", retrying." << LL_ENDL; mRequest->reEnqueue(); } - + // Release the ref to the request. - mRequest.reset(); + mRequest.reset(); // Don't fire again - return TRUE; + return true; } diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index aad6ceecb2..ab79442f51 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -310,12 +310,12 @@ public: : LLEventTimer(period), LLPanelPeople::Updater(cb) { - mEventTimer.stop(); + stop(); } - virtual bool tick() override // from LLEventTimer + bool tick() override // from LLEventTimer { - return FALSE; + return false; } }; @@ -359,7 +359,7 @@ public: { // events can arrive quickly in bulk - we need not process EVERY one of them - // so we wait a short while to let others pile-in, and process them in aggregate. - mEventTimer.start(); + start(); } // save-up all the mask-bits which have come-in @@ -377,10 +377,10 @@ public: } // Stop updates. - mEventTimer.stop(); + stop(); mMask = 0; - return FALSE; + return false; } // virtual @@ -499,19 +499,19 @@ public: { // update immediately and start regular updates update(); - mEventTimer.start(); + start(); } else { // stop regular updates - mEventTimer.stop(); + stop(); } } bool tick() override { update(); - return FALSE; + return false; } private: }; diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index 79d03922cc..a6d628e1ad 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -46,9 +46,7 @@ public: :LLEventTimer(period), mMask(mask), mCallback(cb) - { - mEventTimer.start(); - } + {} virtual ~Updater(){} diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 60bada8f58..2bc8d04a8e 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -181,13 +181,13 @@ LLSpeakerActionTimer::LLSpeakerActionTimer(action_callback_t action_cb, F32 acti { } -BOOL LLSpeakerActionTimer::tick() +bool LLSpeakerActionTimer::tick() { if (mActionCallback) { return (BOOL)mActionCallback(mSpeakerId); } - return TRUE; + return true; } void LLSpeakerActionTimer::unset() diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index d30e028d33..d2a650f200 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -57,7 +57,7 @@ void LLToastLifeTimer::restart() bool LLToastLifeTimer::getStarted() { - return LLLater::instance.isRunning(mTimer); + return isRunning(); } void LLToastLifeTimer::setPeriod(F32 period) @@ -326,7 +326,7 @@ void LLToast::setFading(bool transparent) F32 LLToast::getTimeLeftToLive() { - F32 time_to_live = mTimer->getRemainingTimeF32(); + F32 time_to_live = mTimer->getRemaining(); if (!mIsFading) { diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index b65305337f..e8b81ac3b4 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2901,9 +2901,9 @@ LLPostTeleportNotifiers::~LLPostTeleportNotifiers() { } -BOOL LLPostTeleportNotifiers::tick() +bool LLPostTeleportNotifiers::tick() { - BOOL all_done = FALSE; + bool all_done = false; if ( gAgent.getTeleportState() == LLAgent::TELEPORT_NONE ) { // get callingcards and landmarks available to the user arriving. @@ -2927,7 +2927,7 @@ BOOL LLPostTeleportNotifiers::tick() gInventory.addObserver(fetcher); } } - all_done = TRUE; + all_done = true; } return all_done; diff --git a/indra/newview/llviewerparcelmediaautoplay.cpp b/indra/newview/llviewerparcelmediaautoplay.cpp index db8fcb4dc4..8cf86910e7 100644 --- a/indra/newview/llviewerparcelmediaautoplay.cpp +++ b/indra/newview/llviewerparcelmediaautoplay.cpp @@ -60,7 +60,7 @@ void LLViewerParcelMediaAutoPlay::playStarted() LLSingleton<LLViewerParcelMediaAutoPlay>::getInstance()->mPlayed = TRUE; } -BOOL LLViewerParcelMediaAutoPlay::tick() +bool LLViewerParcelMediaAutoPlay::tick() { LLParcel *this_parcel = NULL; LLViewerRegion *this_region = NULL; @@ -156,7 +156,7 @@ BOOL LLViewerParcelMediaAutoPlay::tick() } - return FALSE; // continue ticking forever please. + return false; // continue ticking forever please. } //static |