summaryrefslogtreecommitdiff
path: root/indra/newview/llwlparammanager.cpp
diff options
context:
space:
mode:
authorSeth ProductEngine <slitovchuk@productengine.com>2011-01-11 19:50:58 +0200
committerSeth ProductEngine <slitovchuk@productengine.com>2011-01-11 19:50:58 +0200
commit4af9db7b79f5721d1be6b8b94dd1e0ce97782d79 (patch)
tree293885299ec1491c8af70168c180f9d1c794e02c /indra/newview/llwlparammanager.cpp
parent4e150d3271334e17bca0b9b47022fa3c529dc8c8 (diff)
STORM-477 FIXED Re-implemented LLDir::getNextFileInDir() as an iterator object.
- Replaced all existing usages of LLDir::getNextFileInDir() with the new directory iterator object. - Removed platform specific LLDir::getNextFileInDir() implementation.
Diffstat (limited to 'indra/newview/llwlparammanager.cpp')
-rw-r--r--indra/newview/llwlparammanager.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
index e5f52dfc97..848efcbb49 100644
--- a/indra/newview/llwlparammanager.cpp
+++ b/indra/newview/llwlparammanager.cpp
@@ -31,6 +31,7 @@
#include "pipeline.h"
#include "llsky.h"
+#include "lldiriterator.h"
#include "llfloaterreg.h"
#include "llsliderctrl.h"
#include "llspinctrl.h"
@@ -100,11 +101,12 @@ void LLWLParamManager::loadPresets(const std::string& file_name)
std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", ""));
LL_DEBUGS2("AppInit", "Shaders") << "Loading Default WindLight settings from " << path_name << LL_ENDL;
- bool found = true;
+ bool found = true;
+ LLDirIterator app_settings_iter(path_name, "*.xml");
while(found)
{
std::string name;
- found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name);
+ found = app_settings_iter.next(name);
if(found)
{
@@ -126,11 +128,12 @@ void LLWLParamManager::loadPresets(const std::string& file_name)
std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", ""));
LL_DEBUGS2("AppInit", "Shaders") << "Loading User WindLight settings from " << path_name2 << LL_ENDL;
- found = true;
+ found = true;
+ LLDirIterator user_settings_iter(path_name2, "*.xml");
while(found)
{
std::string name;
- found = gDirUtilp->getNextFileInDir(path_name2, "*.xml", name);
+ found = user_settings_iter.next(name);
if(found)
{
name=name.erase(name.length()-4);