summaryrefslogtreecommitdiff
path: root/indra/newview/llwaterparammanager.cpp
diff options
context:
space:
mode:
authorcallum <none@none>2011-05-13 17:09:40 -0700
committercallum <none@none>2011-05-13 17:09:40 -0700
commit889f6cc3b3603bc65ba3cfe19f919e87b3f12366 (patch)
tree7cd1dbda844d3a837df476738dabc255c8951a0a /indra/newview/llwaterparammanager.cpp
parente4a9704d4157151442accca1116ad70f7f63ae95 (diff)
parent1e6d1879a01d57e8949add79fa4f3ef5d11c1c43 (diff)
Merge with tip
Diffstat (limited to 'indra/newview/llwaterparammanager.cpp')
-rw-r--r--indra/newview/llwaterparammanager.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index 4b3a9a4dc3..67bb965f99 100644
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -33,6 +33,7 @@
#include "pipeline.h"
#include "llsky.h"
+#include "lldiriterator.h"
#include "llfloaterreg.h"
#include "llsliderctrl.h"
#include "llspinctrl.h"
@@ -87,11 +88,12 @@ void LLWaterParamManager::loadAllPresets(const std::string& file_name)
std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", ""));
LL_DEBUGS2("AppInit", "Shaders") << "Loading Default water 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)
{
@@ -113,11 +115,12 @@ void LLWaterParamManager::loadAllPresets(const std::string& file_name)
std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", ""));
LL_DEBUGS2("AppInit", "Shaders") << "Loading User water 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);