summaryrefslogtreecommitdiff
path: root/indra/llvfs
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2010-10-28 18:09:09 -0400
committerOz Linden <oz@lindenlab.com>2010-10-28 18:09:09 -0400
commit4fa6500b5107f9d300a6ab7b6f011fb19621b05c (patch)
tree3ae9e52f75ac2b9deeb17e21a9393697a2706806 /indra/llvfs
parent12ff24bae4ab88d5d6ca3361f491e05768e57bb4 (diff)
STORM-480 remove unused "wrap" parameter from LLDir::getNetFileInDir
--HG-- branch : storm-102
Diffstat (limited to 'indra/llvfs')
-rw-r--r--indra/llvfs/lldir.cpp2
-rw-r--r--indra/llvfs/lldir.h3
-rw-r--r--indra/llvfs/lldir_linux.cpp9
-rw-r--r--indra/llvfs/lldir_linux.h2
-rw-r--r--indra/llvfs/lldir_mac.cpp8
-rw-r--r--indra/llvfs/lldir_mac.h2
-rw-r--r--indra/llvfs/lldir_solaris.cpp9
-rw-r--r--indra/llvfs/lldir_solaris.h2
-rw-r--r--indra/llvfs/lldir_win32.cpp18
-rw-r--r--indra/llvfs/lldir_win32.h2
-rw-r--r--indra/llvfs/tests/lldir_test.cpp8
11 files changed, 18 insertions, 47 deletions
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp
index 938fb008c9..1179180da2 100644
--- a/indra/llvfs/lldir.cpp
+++ b/indra/llvfs/lldir.cpp
@@ -83,7 +83,7 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
std::string filename;
std::string fullpath;
S32 result;
- while (getNextFileInDir(dirname, mask, filename, FALSE))
+ while (getNextFileInDir(dirname, mask, filename))
{
fullpath = dirname;
fullpath += getDirDelimiter();
diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h
index 0730b0fa79..643b89199b 100644
--- a/indra/llvfs/lldir.h
+++ b/indra/llvfs/lldir.h
@@ -78,8 +78,7 @@ class LLDir
/// Walk the files in a directory, with file pattern matching
virtual BOOL getNextFileInDir(const std::string &dirname, ///< directory path - must end in trailing slash!
const std::string &mask, ///< file pattern string (use "*" for all)
- std::string &fname, ///< found file name
- BOOL wrap ///< DEPRECATED - set to FALSE
+ std::string &fname ///< found file name
) = 0;
/**<
* @returns true if a file was found, false if the entire directory has been scanned.
diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp
index a1c6669b97..cf5fdd3b4a 100644
--- a/indra/llvfs/lldir_linux.cpp
+++ b/indra/llvfs/lldir_linux.cpp
@@ -243,8 +243,7 @@ U32 LLDir_Linux::countFilesInDir(const std::string &dirname, const std::string &
}
// get the next file in the directory
-// automatically wrap if we've hit the end
-BOOL LLDir_Linux::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap)
+BOOL LLDir_Linux::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
{
glob_t g;
BOOL result = FALSE;
@@ -276,11 +275,6 @@ BOOL LLDir_Linux::getNextFileInDir(const std::string &dirname, const std::string
mCurrentDirIndex++;
- if((mCurrentDirIndex >= (int)g.gl_pathc) && wrap)
- {
- mCurrentDirIndex = 0;
- }
-
if(mCurrentDirIndex < (int)g.gl_pathc)
{
// llinfos << "getNextFileInDir: returning number " << mCurrentDirIndex << ", path is " << g.gl_pathv[mCurrentDirIndex] << llendl;
@@ -309,7 +303,6 @@ BOOL LLDir_Linux::getNextFileInDir(const std::string &dirname, const std::string
// get a random file in the directory
-// automatically wrap if we've hit the end
void LLDir_Linux::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
{
S32 num_files;
diff --git a/indra/llvfs/lldir_linux.h b/indra/llvfs/lldir_linux.h
index 809959e873..ef4495a627 100644
--- a/indra/llvfs/lldir_linux.h
+++ b/indra/llvfs/lldir_linux.h
@@ -43,7 +43,7 @@ public:
public:
virtual std::string getCurPath();
virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
- virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap);
+ virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
virtual void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
/*virtual*/ BOOL fileExists(const std::string &filename) const;
diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp
index b41b0ec5dd..290b3bd0db 100644
--- a/indra/llvfs/lldir_mac.cpp
+++ b/indra/llvfs/lldir_mac.cpp
@@ -259,8 +259,7 @@ U32 LLDir_Mac::countFilesInDir(const std::string &dirname, const std::string &ma
}
// get the next file in the directory
-// automatically wrap if we've hit the end
-BOOL LLDir_Mac::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap)
+BOOL LLDir_Mac::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
{
glob_t g;
BOOL result = FALSE;
@@ -292,11 +291,6 @@ BOOL LLDir_Mac::getNextFileInDir(const std::string &dirname, const std::string &
mCurrentDirIndex++;
- if((mCurrentDirIndex >= g.gl_pathc) && wrap)
- {
- mCurrentDirIndex = 0;
- }
-
if(mCurrentDirIndex < g.gl_pathc)
{
// llinfos << "getNextFileInDir: returning number " << mCurrentDirIndex << ", path is " << g.gl_pathv[mCurrentDirIndex] << llendl;
diff --git a/indra/llvfs/lldir_mac.h b/indra/llvfs/lldir_mac.h
index 04c52dc940..f80ca47d92 100644
--- a/indra/llvfs/lldir_mac.h
+++ b/indra/llvfs/lldir_mac.h
@@ -43,7 +43,7 @@ public:
virtual S32 deleteFilesInDir(const std::string &dirname, const std::string &mask);
virtual std::string getCurPath();
virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
- virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap);
+ virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
virtual void getRandomFileInDir(const std::string &dirname, const std::string &ask, std::string &fname);
virtual BOOL fileExists(const std::string &filename) const;
diff --git a/indra/llvfs/lldir_solaris.cpp b/indra/llvfs/lldir_solaris.cpp
index 4323dfd44a..09a96ef6b3 100644
--- a/indra/llvfs/lldir_solaris.cpp
+++ b/indra/llvfs/lldir_solaris.cpp
@@ -261,8 +261,7 @@ U32 LLDir_Solaris::countFilesInDir(const std::string &dirname, const std::string
}
// get the next file in the directory
-// automatically wrap if we've hit the end
-BOOL LLDir_Solaris::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap)
+BOOL LLDir_Solaris::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
{
glob_t g;
BOOL result = FALSE;
@@ -294,11 +293,6 @@ BOOL LLDir_Solaris::getNextFileInDir(const std::string &dirname, const std::stri
mCurrentDirIndex++;
- if((mCurrentDirIndex >= (int)g.gl_pathc) && wrap)
- {
- mCurrentDirIndex = 0;
- }
-
if(mCurrentDirIndex < (int)g.gl_pathc)
{
// llinfos << "getNextFileInDir: returning number " << mCurrentDirIndex << ", path is " << g.gl_pathv[mCurrentDirIndex] << llendl;
@@ -327,7 +321,6 @@ BOOL LLDir_Solaris::getNextFileInDir(const std::string &dirname, const std::stri
// get a random file in the directory
-// automatically wrap if we've hit the end
void LLDir_Solaris::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
{
S32 num_files;
diff --git a/indra/llvfs/lldir_solaris.h b/indra/llvfs/lldir_solaris.h
index 6e0c5cfc69..1c21397c38 100644
--- a/indra/llvfs/lldir_solaris.h
+++ b/indra/llvfs/lldir_solaris.h
@@ -43,7 +43,7 @@ public:
public:
virtual std::string getCurPath();
virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
- virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap);
+ virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
virtual void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
/*virtual*/ BOOL fileExists(const std::string &filename) const;
diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp
index 52d864e26f..ecfa4a07d4 100644
--- a/indra/llvfs/lldir_win32.cpp
+++ b/indra/llvfs/lldir_win32.cpp
@@ -247,14 +247,14 @@ U32 LLDir_Win32::countFilesInDir(const std::string &dirname, const std::string &
// get the next file in the directory
// automatically wrap if we've hit the end
-BOOL LLDir_Win32::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap)
+BOOL LLDir_Win32::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
{
llutf16string dirnamew = utf8str_to_utf16str(dirname);
- return getNextFileInDir(dirnamew, mask, fname, wrap);
+ return getNextFileInDir(dirnamew, mask, fname);
}
-BOOL LLDir_Win32::getNextFileInDir(const llutf16string &dirname, const std::string &mask, std::string &fname, BOOL wrap)
+BOOL LLDir_Win32::getNextFileInDir(const llutf16string &dirname, const std::string &mask, std::string &fname)
{
WIN32_FIND_DATAW FileData;
@@ -290,15 +290,8 @@ BOOL LLDir_Win32::getNextFileInDir(const llutf16string &dirname, const std::stri
FindClose(mDirSearch_h);
mCurrentDir[0] = NULL;
- if (wrap)
- {
- return(getNextFileInDir(pathname,"",fname,TRUE));
- }
- else
- {
- fname[0] = 0;
- return(FALSE);
- }
+ fname[0] = 0;
+ return(FALSE);
}
else
{
@@ -318,7 +311,6 @@ BOOL LLDir_Win32::getNextFileInDir(const llutf16string &dirname, const std::stri
// get a random file in the directory
-// automatically wrap if we've hit the end
void LLDir_Win32::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
{
S32 num_files;
diff --git a/indra/llvfs/lldir_win32.h b/indra/llvfs/lldir_win32.h
index d3e45dc1f3..2ec9025250 100644
--- a/indra/llvfs/lldir_win32.h
+++ b/indra/llvfs/lldir_win32.h
@@ -40,7 +40,7 @@ public:
/*virtual*/ std::string getCurPath();
/*virtual*/ U32 countFilesInDir(const std::string &dirname, const std::string &mask);
- /*virtual*/ BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap);
+ /*virtual*/ BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
/*virtual*/ void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
/*virtual*/ BOOL fileExists(const std::string &filename) const;
diff --git a/indra/llvfs/tests/lldir_test.cpp b/indra/llvfs/tests/lldir_test.cpp
index 3247e0ab83..dc446ccbe5 100644
--- a/indra/llvfs/tests/lldir_test.cpp
+++ b/indra/llvfs/tests/lldir_test.cpp
@@ -311,7 +311,7 @@ namespace tut
int found1 = 0;
bool filesFound1[5] = { false, false, false, false, false };
// std::cerr << "searching '"+dir1+"' for *\n";
- while ( found1 <= 5 && gDirUtilp->getNextFileInDir(dir1, "*", scan1result, false) )
+ while ( found1 <= 5 && gDirUtilp->getNextFileInDir(dir1, "*", scan1result) )
{
found1++;
// std::cerr << " found '"+scan1result+"'\n";
@@ -338,7 +338,7 @@ namespace tut
bool filesFound2[5] = { false, false, false, false, false };
// std::cerr << "searching '"+dir2+"' for *.xyz\n";
- while ( found2 <= 5 && gDirUtilp->getNextFileInDir(dir2, "*.xyz", scan2result, false) )
+ while ( found2 <= 5 && gDirUtilp->getNextFileInDir(dir2, "*.xyz", scan2result) )
{
found2++;
// std::cerr << " found '"+scan2result+"'\n";
@@ -367,7 +367,7 @@ namespace tut
bool filesFound3[5] = { false, false, false, false, false };
// std::cerr << "searching '"+dir2+"' for *.mno\n";
- while ( found3 <= 5 && gDirUtilp->getNextFileInDir(dir2, "*.mno", scan3result, false) )
+ while ( found3 <= 5 && gDirUtilp->getNextFileInDir(dir2, "*.mno", scan3result) )
{
found3++;
// std::cerr << " found '"+scan3result+"'\n";
@@ -396,7 +396,7 @@ namespace tut
bool filesFound4[5] = { false, false, false, false, false };
// std::cerr << "searching '"+dir1+"' for *.foo\n";
- while ( found4 <= 5 && gDirUtilp->getNextFileInDir(dir1, "*.foo", scan4result, false) )
+ while ( found4 <= 5 && gDirUtilp->getNextFileInDir(dir1, "*.foo", scan4result) )
{
found4++;
// std::cerr << " found '"+scan4result+"'\n";