diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2021-10-07 11:53:45 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2021-10-07 11:53:45 -0400 |
commit | 2cb09dd4a828756dce6180505c63851aa9875187 (patch) | |
tree | 749c225b8db575e1ca5fc90ef905b084017cda0c /indra/newview/llnotificationofferhandler.cpp | |
parent | 1ef78e2afa9e8424dd5d84b2b104b31e72e9e95a (diff) |
SL-16024: Return shared_ptr from LLInstanceTracker::getInstance().
It feels wrong to return a dumb LLInstanceTracker subclass* from getInstance()
when we use std::shared_ptr and std::weak_ptr internally. But tweak consumers
to use 'auto' or LLInstanceTracker::ptr_t in case we later revisit this
decision.
We did add a couple get() calls where it's important to obtain a dumb pointer.
Diffstat (limited to 'indra/newview/llnotificationofferhandler.cpp')
-rw-r--r-- | indra/newview/llnotificationofferhandler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index a9678b1e93..d9359d20cf 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -166,14 +166,14 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification) /*virtual*/ void LLOfferHandler::onChange(LLNotificationPtr p) { - LLToastNotifyPanel* panelp = LLToastNotifyPanel::getInstance(p->getID()); + auto panelp = LLToastNotifyPanel::getInstance(p->getID()); if (panelp) { // // HACK: if we're dealing with a notification embedded in IM, update it // otherwise remove its toast // - if (dynamic_cast<LLIMToastNotifyPanel*>(panelp)) + if (dynamic_cast<LLIMToastNotifyPanel*>(panelp.get())) { panelp->updateNotification(); } |