More code cleanup to fix compile

This commit is contained in:
Lirusaito
2019-07-25 10:56:20 -04:00
parent ec8d2646cd
commit ed6dcb6a5b

View File

@@ -338,67 +338,58 @@ void LLPrefsAscentChat::refresh()
} }
//Chat UI ----------------------------------------------------------------------------- //Chat UI -----------------------------------------------------------------------------
if (combo = getChild<LLComboBox>("chat_tabs_namesystem_combobox")) if (auto combo = getChild<LLComboBox>("chat_tabs_namesystem_combobox"))
combo->setCurrentByIndex(mChatTabNames); combo->setCurrentByIndex(mChatTabNames);
if (combo = getChild<LLComboBox>("friends_namesystem_combobox")) if (auto combo = getChild<LLComboBox>("friends_namesystem_combobox"))
combo->setCurrentByIndex(mFriendNames); combo->setCurrentByIndex(mFriendNames);
if (combo = getChild<LLComboBox>("group_members_namesystem_combobox")) if (auto combo = getChild<LLComboBox>("group_members_namesystem_combobox"))
combo->setCurrentByIndex(mGroupMembersNames); combo->setCurrentByIndex(mGroupMembersNames);
if (combo = getChild<LLComboBox>("land_management_namesystem_combobox")) if (auto combo = getChild<LLComboBox>("land_management_namesystem_combobox"))
combo->setCurrentByIndex(mLandManagementNames); combo->setCurrentByIndex(mLandManagementNames);
if (combo = getChild<LLComboBox>("radar_namesystem_combobox")) if (auto combo = getChild<LLComboBox>("radar_namesystem_combobox"))
combo->setCurrentByIndex(mRadarNames); combo->setCurrentByIndex(mRadarNames);
if (combo = getChild<LLComboBox>("speaker_namesystem_combobox")) if (auto combo = getChild<LLComboBox>("speaker_namesystem_combobox"))
combo->setCurrentByIndex(mSpeakerNames); combo->setCurrentByIndex(mSpeakerNames);
//Text Options ------------------------------------------------------------------------ //Text Options ------------------------------------------------------------------------
combo = getChild<LLComboBox>("SpellBase"); if (combo = getChild<LLComboBox>("SpellBase"))
if (combo != NULL)
{ {
combo->removeall(); combo->removeall();
std::vector<std::string> names = glggHunSpell->getDicts();
for (int i = 0; i < (int)names.size(); i++) for (const auto& name : glggHunSpell->getDicts())
{ {
combo->add(names[i]); combo->add(name);
} }
combo->setSimple(gSavedSettings.getString("SpellBase")); combo->setSimple(gSavedSettings.getString("SpellBase"));
} }
combo = getChild<LLComboBox>("EmSpell_Avail"); if (auto combo = getChild<LLComboBox>("EmSpell_Avail"))
if (combo != NULL)
{ {
combo->removeall(); combo->removeall();
combo->add(""); combo->add(LLStringUtil::null);
std::vector<std::string> names = glggHunSpell->getAvailDicts();
for (int i = 0; i < (int)names.size(); i++) for (const auto& name : glggHunSpell->getAvailDicts())
{ {
combo->add(names[i]); combo->add(name);
} }
combo->setSimple(std::string("")); combo->setSimple(LLStringUtil::null);
} }
combo = getChild<LLComboBox>("EmSpell_Installed"); if (auto combo = getChild<LLComboBox>("EmSpell_Installed"))
if (combo != NULL)
{ {
combo->removeall(); combo->removeall();
combo->add(""); combo->add(LLStringUtil::null);
std::vector<std::string> names = glggHunSpell->getInstalledDicts();
for (int i = 0; i < (int)names.size(); i++) for (const auto& name : glggHunSpell->getInstalledDicts())
{ {
combo->add(names[i]); combo->add(name);
} }
combo->setSimple(std::string("")); combo->setSimple(LLStringUtil::null);
} }
childSetEnabled("KeywordsList", mKeywordsOn); childSetEnabled("KeywordsList", mKeywordsOn);