diff options
author | Mike Antipov <mantipov@productengine.com> | 2009-12-24 14:31:48 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2009-12-24 14:31:48 +0200 |
commit | 8f81b5dbe4ff0a0d6486e5325250650986f6a81e (patch) | |
tree | b233ec9b213f379a50189a0947762e5fddf531b2 /indra/newview/llavatarlistitem.cpp | |
parent | d75ba371a2fbbd5af981168dffe86079357ef719 (diff) |
Work on normal task EXT-3636 (Code Improvements: Voice control panels - Make Voice states and fade timeout xml driven)
-- Code cleaned up: renamed variables related to item styles,
-- changed signature of LLAvatarListItem::getItemStylesParams & LLAvatarListItem::getItemIconColorMap to return a reference to avoid calling of plural copy constructors.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llavatarlistitem.cpp')
-rw-r--r-- | indra/newview/llavatarlistitem.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 61361d78e6..8bc11b0c1c 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -178,19 +178,19 @@ void LLAvatarListItem::setHighlight(const std::string& highlight) setNameInternal(mAvatarName->getText(), mHighlihtSubstring = highlight); } -void LLAvatarListItem::setStyle(EItemStyle voice_state) +void LLAvatarListItem::setStyle(EItemStyle item_style) { - voice_state_map_t mVoiceStateMap = getItemStylesParams(); + item_style_map_t& item_styles_params_map = getItemStylesParams(); - mAvatarNameStyle = mVoiceStateMap[voice_state]; + mAvatarNameStyle = item_styles_params_map[item_style]; // *NOTE: You cannot set the style on a text box anymore, you must // rebuild the text. This will cause problems if the text contains // hyperlinks, as their styles will be wrong. setNameInternal(mAvatarName->getText(), mHighlihtSubstring); - icon_color_map_t item_icon_color_map = getItemIconColorMap(); - mAvatarIcon->setColor(item_icon_color_map[voice_state]); + icon_color_map_t& item_icon_color_map = getItemIconColorMap(); + mAvatarIcon->setColor(item_icon_color_map[item_style]); } void LLAvatarListItem::setAvatarId(const LLUUID& id, bool ignore_status_changes) @@ -408,9 +408,9 @@ std::string LLAvatarListItem::formatSeconds(U32 secs) } // static -LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams() +LLAvatarListItem::item_style_map_t& LLAvatarListItem::getItemStylesParams() { - static voice_state_map_t item_styles_params_map; + static item_style_map_t item_styles_params_map; if (!item_styles_params_map.empty()) return item_styles_params_map; LLPanel::Params params = LLUICtrlFactory::getDefaultParams<LLPanel>(); @@ -460,7 +460,7 @@ LLAvatarListItem::voice_state_map_t LLAvatarListItem::getItemStylesParams() } // static -LLAvatarListItem::icon_color_map_t LLAvatarListItem::getItemIconColorMap() +LLAvatarListItem::icon_color_map_t& LLAvatarListItem::getItemIconColorMap() { static icon_color_map_t item_icon_color_map; if (!item_icon_color_map.empty()) return item_icon_color_map; |