summaryrefslogtreecommitdiff
path: root/indra/llui/llpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llpanel.cpp')
-rw-r--r--indra/llui/llpanel.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 468cdb10fb..8e96bdde80 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -55,7 +55,7 @@ LLPanel::factory_stack_t LLPanel::sFactoryStack;
// Compiler optimization, generate extern template
template class LLPanel* LLView::getChild<class LLPanel>(
- const std::string& name, bool recurse) const;
+ std::string_view name, bool recurse) const;
LLPanel::LocalizedString::LocalizedString()
: name("name"),
@@ -277,7 +277,7 @@ void LLPanel::setDefaultBtn(LLButton* btn)
}
}
-void LLPanel::setDefaultBtn(const std::string& id)
+void LLPanel::setDefaultBtn(std::string_view id)
{
LLButton *button = getChild<LLButton>(id);
if (button)
@@ -490,8 +490,8 @@ void LLPanel::initFromParams(const LLPanel::Params& p)
setBackgroundVisible(p.background_visible);
setBackgroundOpaque(p.background_opaque);
- setBackgroundColor(p.bg_opaque_color().get());
- setTransparentColor(p.bg_alpha_color().get());
+ setBackgroundColor(p.bg_opaque_color);
+ setTransparentColor(p.bg_alpha_color);
mBgOpaqueImage = p.bg_opaque_image();
mBgAlphaImage = p.bg_alpha_image();
mBgOpaqueImageOverlay = p.bg_opaque_image_overlay;
@@ -593,12 +593,12 @@ bool LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu
return true;
}
-bool LLPanel::hasString(const std::string& name)
+bool LLPanel::hasString(std::string_view name)
{
return mUIStrings.find(name) != mUIStrings.end();
}
-std::string LLPanel::getString(const std::string& name, const LLStringUtil::format_map_t& args) const
+std::string LLPanel::getString(std::string_view name, const LLStringUtil::format_map_t& args) const
{
ui_string_map_t::const_iterator found_it = mUIStrings.find(name);
if (found_it != mUIStrings.end())
@@ -608,7 +608,7 @@ std::string LLPanel::getString(const std::string& name, const LLStringUtil::form
formatted_string.setArgList(args);
return formatted_string.getString();
}
- std::string err_str("Failed to find string " + name + " in panel " + getName()); //*TODO: Translate
+ std::string err_str("Failed to find string " + std::string(name) + " in panel " + getName()); //*TODO: Translate
if(LLUI::getInstance()->mSettingGroups["config"]->getBOOL("QAMode"))
{
LL_ERRS() << err_str << LL_ENDL;
@@ -620,14 +620,14 @@ std::string LLPanel::getString(const std::string& name, const LLStringUtil::form
return LLStringUtil::null;
}
-std::string LLPanel::getString(const std::string& name) const
+std::string LLPanel::getString(std::string_view name) const
{
ui_string_map_t::const_iterator found_it = mUIStrings.find(name);
if (found_it != mUIStrings.end())
{
return found_it->second;
}
- std::string err_str("Failed to find string " + name + " in panel " + getName()); //*TODO: Translate
+ std::string err_str("Failed to find string " + std::string(name) +" in panel " + getName()); //*TODO: Translate
if(LLUI::getInstance()->mSettingGroups["config"]->getBOOL("QAMode"))
{
LL_ERRS() << err_str << LL_ENDL;
@@ -640,7 +640,7 @@ std::string LLPanel::getString(const std::string& name) const
}
-void LLPanel::childSetVisible(const std::string& id, bool visible)
+void LLPanel::childSetVisible(std::string_view id, bool visible)
{
LLView* child = findChild<LLView>(id);
if (child)
@@ -649,7 +649,7 @@ void LLPanel::childSetVisible(const std::string& id, bool visible)
}
}
-void LLPanel::childSetEnabled(const std::string& id, bool enabled)
+void LLPanel::childSetEnabled(std::string_view id, bool enabled)
{
LLView* child = findChild<LLView>(id);
if (child)
@@ -658,7 +658,7 @@ void LLPanel::childSetEnabled(const std::string& id, bool enabled)
}
}
-void LLPanel::childSetFocus(const std::string& id, bool focus)
+void LLPanel::childSetFocus(std::string_view id, bool focus)
{
LLUICtrl* child = findChild<LLUICtrl>(id);
if (child)
@@ -667,7 +667,7 @@ void LLPanel::childSetFocus(const std::string& id, bool focus)
}
}
-bool LLPanel::childHasFocus(const std::string& id)
+bool LLPanel::childHasFocus(std::string_view id)
{
LLUICtrl* child = findChild<LLUICtrl>(id);
if (child)
@@ -684,7 +684,7 @@ bool LLPanel::childHasFocus(const std::string& id)
// Prefer getChild<LLUICtrl>("foo")->setCommitCallback(boost:bind(...)),
// which takes a generic slot. Or use mCommitCallbackRegistrar.add() with
// a named callback and reference it in XML.
-void LLPanel::childSetCommitCallback(const std::string& id, boost::function<void (LLUICtrl*,void*)> cb, void* data)
+void LLPanel::childSetCommitCallback(std::string_view id, boost::function<void (LLUICtrl*,void*)> cb, void* data)
{
LLUICtrl* child = findChild<LLUICtrl>(id);
if (child)
@@ -693,7 +693,7 @@ void LLPanel::childSetCommitCallback(const std::string& id, boost::function<void
}
}
-void LLPanel::childSetColor(const std::string& id, const LLColor4& color)
+void LLPanel::childSetColor(std::string_view id, const LLUIColor& color)
{
LLUICtrl* child = findChild<LLUICtrl>(id);
if (child)
@@ -702,7 +702,7 @@ void LLPanel::childSetColor(const std::string& id, const LLColor4& color)
}
}
-LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(const std::string& id) const
+LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(std::string_view id) const
{
LLUICtrl* child = findChild<LLUICtrl>(id);
if (child)
@@ -712,7 +712,7 @@ LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(const std::string&
return NULL;
}
-LLCtrlListInterface* LLPanel::childGetListInterface(const std::string& id) const
+LLCtrlListInterface* LLPanel::childGetListInterface(std::string_view id) const
{
LLUICtrl* child = findChild<LLUICtrl>(id);
if (child)
@@ -722,7 +722,7 @@ LLCtrlListInterface* LLPanel::childGetListInterface(const std::string& id) const
return NULL;
}
-LLCtrlScrollInterface* LLPanel::childGetScrollInterface(const std::string& id) const
+LLCtrlScrollInterface* LLPanel::childGetScrollInterface(std::string_view id) const
{
LLUICtrl* child = findChild<LLUICtrl>(id);
if (child)
@@ -732,7 +732,7 @@ LLCtrlScrollInterface* LLPanel::childGetScrollInterface(const std::string& id) c
return NULL;
}
-void LLPanel::childSetValue(const std::string& id, LLSD value)
+void LLPanel::childSetValue(std::string_view id, LLSD value)
{
LLUICtrl* child = findChild<LLUICtrl>(id);
if (child)
@@ -741,7 +741,7 @@ void LLPanel::childSetValue(const std::string& id, LLSD value)
}
}
-LLSD LLPanel::childGetValue(const std::string& id) const
+LLSD LLPanel::childGetValue(std::string_view id) const
{
LLUICtrl* child = findChild<LLUICtrl>(id);
if (child)
@@ -752,7 +752,7 @@ LLSD LLPanel::childGetValue(const std::string& id) const
return LLSD();
}
-bool LLPanel::childSetTextArg(const std::string& id, const std::string& key, const LLStringExplicit& text)
+bool LLPanel::childSetTextArg(std::string_view id, const std::string& key, const LLStringExplicit& text)
{
LLUICtrl* child = findChild<LLUICtrl>(id);
if (child)
@@ -762,7 +762,7 @@ bool LLPanel::childSetTextArg(const std::string& id, const std::string& key, con
return false;
}
-bool LLPanel::childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text)
+bool LLPanel::childSetLabelArg(std::string_view id, const std::string& key, const LLStringExplicit& text)
{
LLView* child = findChild<LLView>(id);
if (child)
@@ -772,7 +772,7 @@ bool LLPanel::childSetLabelArg(const std::string& id, const std::string& key, co
return false;
}
-void LLPanel::childSetAction(const std::string& id, const commit_signal_t::slot_type& function)
+void LLPanel::childSetAction(std::string_view id, const commit_signal_t::slot_type& function)
{
LLButton* button = findChild<LLButton>(id);
if (button)
@@ -781,7 +781,7 @@ void LLPanel::childSetAction(const std::string& id, const commit_signal_t::slot_
}
}
-void LLPanel::childSetAction(const std::string& id, boost::function<void(void*)> function, void* value)
+void LLPanel::childSetAction(std::string_view id, boost::function<void(void*)> function, void* value)
{
LLButton* button = findChild<LLButton>(id);
if (button)