Skip to content
Snippets Groups Projects
Commit 15490d64 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix large objects being passed by value in notification floater

parent ff647e65
No related branches found
No related tags found
No related merge requests found
...@@ -120,7 +120,7 @@ LLFloaterNotificationsTabbed::~LLFloaterNotificationsTabbed() ...@@ -120,7 +120,7 @@ LLFloaterNotificationsTabbed::~LLFloaterNotificationsTabbed()
} }
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
void LLFloaterNotificationsTabbed::removeItemByID(const LLUUID& id, std::string type) void LLFloaterNotificationsTabbed::removeItemByID(const LLUUID& id, const std::string& type)
{ {
if(mNotificationsSeparator->removeItemByID(type, id)) if(mNotificationsSeparator->removeItemByID(type, id))
{ {
...@@ -145,7 +145,7 @@ void LLFloaterNotificationsTabbed::removeItemByID(const LLUUID& id, std::string ...@@ -145,7 +145,7 @@ void LLFloaterNotificationsTabbed::removeItemByID(const LLUUID& id, std::string
} }
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
LLPanel * LLFloaterNotificationsTabbed::findItemByID(const LLUUID& id, std::string type) LLPanel * LLFloaterNotificationsTabbed::findItemByID(const LLUUID& id, const std::string& type)
{ {
return mNotificationsSeparator->findItemByID(type, id); return mNotificationsSeparator->findItemByID(type, id);
} }
...@@ -265,7 +265,7 @@ void LLFloaterNotificationsTabbed::updateNotificationCounters() ...@@ -265,7 +265,7 @@ void LLFloaterNotificationsTabbed::updateNotificationCounters()
} }
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
void LLFloaterNotificationsTabbed::addItem(LLNotificationListItem::Params p) void LLFloaterNotificationsTabbed::addItem(const LLNotificationListItem::Params& p)
{ {
// do not add clones // do not add clones
if (mNotificationsSeparator->findItemByID(p.notification_name, p.notification_id)) if (mNotificationsSeparator->findItemByID(p.notification_name, p.notification_id))
...@@ -490,7 +490,7 @@ bool LLNotificationSeparator::addItem(std::string& tag, LLNotificationListItem* ...@@ -490,7 +490,7 @@ bool LLNotificationSeparator::addItem(std::string& tag, LLNotificationListItem*
} }
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
bool LLNotificationSeparator::removeItemByID(std::string& tag, const LLUUID& id) bool LLNotificationSeparator::removeItemByID(const std::string& tag, const LLUUID& id)
{ {
notification_list_map_t::iterator it = mNotificationListMap.find(tag); notification_list_map_t::iterator it = mNotificationListMap.find(tag);
if (it != mNotificationListMap.end()) if (it != mNotificationListMap.end())
...@@ -521,7 +521,7 @@ U32 LLNotificationSeparator::size() const ...@@ -521,7 +521,7 @@ U32 LLNotificationSeparator::size() const
} }
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
LLPanel* LLNotificationSeparator::findItemByID(std::string& tag, const LLUUID& id) LLPanel* LLNotificationSeparator::findItemByID(const std::string& tag, const LLUUID& id)
{ {
notification_list_map_t::iterator it = mNotificationListMap.find(tag); notification_list_map_t::iterator it = mNotificationListMap.find(tag);
if (it != mNotificationListMap.end()) if (it != mNotificationListMap.end())
......
...@@ -51,8 +51,8 @@ class LLNotificationSeparator ...@@ -51,8 +51,8 @@ class LLNotificationSeparator
void initTaggedList(const std::set<std::string>& tags, LLNotificationListView* list); void initTaggedList(const std::set<std::string>& tags, LLNotificationListView* list);
void initUnTaggedList(LLNotificationListView* list); void initUnTaggedList(LLNotificationListView* list);
bool addItem(std::string& tag, LLNotificationListItem* item); bool addItem(std::string& tag, LLNotificationListItem* item);
LLPanel* findItemByID(std::string& tag, const LLUUID& id); LLPanel* findItemByID(const std::string& tag, const LLUUID& id);
bool removeItemByID(std::string& tag, const LLUUID& id); bool removeItemByID(const std::string& tag, const LLUUID& id);
void getItems(std::vector<LLNotificationListItem*>& items) const; void getItems(std::vector<LLNotificationListItem*>& items) const;
U32 size() const; U32 size() const;
private: private:
...@@ -79,8 +79,8 @@ class LLFloaterNotificationsTabbed : public LLTransientDockableFloater ...@@ -79,8 +79,8 @@ class LLFloaterNotificationsTabbed : public LLTransientDockableFloater
bool isWindowEmpty(); bool isWindowEmpty();
// Operating with items // Operating with items
void removeItemByID(const LLUUID& id, std::string type); void removeItemByID(const LLUUID& id, const std::string& type);
LLPanel * findItemByID(const LLUUID& id, std::string type); LLPanel * findItemByID(const LLUUID& id, const std::string& type);
void updateNotificationCounters(); void updateNotificationCounters();
void updateNotificationCounter(S32 panelIndex, S32 counterValue, std::string stringName); void updateNotificationCounter(S32 panelIndex, S32 counterValue, std::string stringName);
...@@ -142,7 +142,7 @@ class LLFloaterNotificationsTabbed : public LLTransientDockableFloater ...@@ -142,7 +142,7 @@ class LLFloaterNotificationsTabbed : public LLTransientDockableFloater
// void initChannel(); // void initChannel();
void clearScreenChannels(); void clearScreenChannels();
// Operating with items // Operating with items
void addItem(LLNotificationListItem::Params p); void addItem(const LLNotificationListItem::Params& p);
void getAllItemsOnCurrentTab(std::vector<LLPanel*>& items) const; void getAllItemsOnCurrentTab(std::vector<LLPanel*>& items) const;
// Closes all notifications and removes them from the Notification Well // Closes all notifications and removes them from the Notification Well
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment