From 55e7ae891d7b9ff123889ce13d487049284150e1 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 23 Aug 2015 19:38:01 +0200 Subject: [PATCH] Erm... --- indra/newview/llfloaterpreference.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 67d0927b07..77f238c1d5 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -4330,14 +4330,9 @@ void FSPanelPreferenceBackup::applySelection(LLScrollListCtrl* control, BOOL all void LLFloaterPreference::loadFontPresetsFromDir(const std::string& dir, LLComboBox* font_selection_combo) { LLDirIterator dir_iter(dir, "*.xml"); - while (1) + std::string file; + while (dir_iter.next(file)) { - std::string file; - if (!dir_iter.next(file)) - { - break; // no more files - } - //hack to deal with "fonts.xml" if (file == "fonts.xml") { @@ -4346,10 +4341,9 @@ void LLFloaterPreference::loadFontPresetsFromDir(const std::string& dir, LLCombo //hack to get "fonts_[name].xml" to "Name" else { - std::string fontpresetname = file.substr(6, file.length()-10); + std::string fontpresetname = file.substr(6, file.length() - 10); LLStringUtil::replaceChar(fontpresetname, '_', ' '); fontpresetname[0] = LLStringOps::toUpper(fontpresetname[0]); - font_selection_combo->add(fontpresetname, file); } }