Encapsulate LFIDBearer::sActive, set with member setActive

This function caches the current type when active,
in the future it could be more useful than that.

sActive is now const, getActive returns const,
IDBearers display information, the interface should only be used for that
This commit is contained in:
Liru Færs
2020-01-06 12:22:31 -05:00
parent f73fb6424b
commit 6839cba56a
10 changed files with 31 additions and 20 deletions

View File

@@ -9034,17 +9034,17 @@ template<typename T> T* get_focused()
return t;
}
const std::string get_slurl_for(const LLUUID& id, LFIDBearer::Type type)
const std::string get_slurl_for(const LLUUID& id, const LFIDBearer::Type& type)
{
return type == LFIDBearer::GROUP ? LLGroupActions::getSLURL(id) : LLAvatarActions::getSLURL(id);
}
const LLWString get_wslurl_for(const LLUUID& id, LFIDBearer::Type type)
const LLWString get_wslurl_for(const LLUUID& id, const LFIDBearer::Type& type)
{
return utf8str_to_wstring(get_slurl_for(id, type));
}
void copy_profile_uri(const LLUUID& id, LFIDBearer::Type type)
void copy_profile_uri(const LLUUID& id, const LFIDBearer::Type& type)
{
gViewerWindow->getWindow()->copyTextToClipboard(get_wslurl_for(id, type));
}