summaryrefslogtreecommitdiff
path: root/indra/llvfs
diff options
context:
space:
mode:
authorAaron Brashears <aaronb@lindenlab.com>2007-01-18 00:44:48 +0000
committerAaron Brashears <aaronb@lindenlab.com>2007-01-18 00:44:48 +0000
commitc189fc0b579352c34285fcf03db4b5bca5cd3804 (patch)
treeba32536c8bf3b23f311e7ae77aa69f9cbaec4582 /indra/llvfs
parent73f0b5029aa247a563862fc39152ce58baa407aa (diff)
Result of svn merge -r56700:56797 svn+ssh://svn/svn/linden/branches/more-random into release.
Diffstat (limited to 'indra/llvfs')
-rw-r--r--indra/llvfs/lldir_linux.cpp8
-rw-r--r--indra/llvfs/lldir_mac.cpp4
-rw-r--r--indra/llvfs/lldir_win32.cpp6
3 files changed, 9 insertions, 9 deletions
diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp
index c72587b9b5..f5573797c9 100644
--- a/indra/llvfs/lldir_linux.cpp
+++ b/indra/llvfs/lldir_linux.cpp
@@ -10,7 +10,7 @@
#include "lldir_linux.h"
#include "llerror.h"
-#include "llrand.h" // for gLindenLabRandomNumber
+#include "llrand.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -267,8 +267,8 @@ BOOL LLDir_Linux::getNextFileInDir(const std::string &dirname, const std::string
// automatically wrap if we've hit the end
void LLDir_Linux::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
{
- U32 num_files;
- U32 which_file;
+ S32 num_files;
+ S32 which_file;
DIR *dirp;
dirent *entryp = NULL;
@@ -280,7 +280,7 @@ void LLDir_Linux::getRandomFileInDir(const std::string &dirname, const std::stri
return;
}
- which_file = gLindenLabRandomNumber.llrand() % num_files;
+ which_file = ll_rand(num_files);
// llinfos << "Random select file #" << which_file << llendl;
diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp
index 591241478d..c056f982c4 100644
--- a/indra/llvfs/lldir_mac.cpp
+++ b/indra/llvfs/lldir_mac.cpp
@@ -268,7 +268,7 @@ BOOL LLDir_Mac::getNextFileInDir(const std::string &dirname, const std::string &
// get a random file in the directory
void LLDir_Mac::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
{
- U32 which_file;
+ S32 which_file;
glob_t g;
fname = "";
@@ -281,7 +281,7 @@ void LLDir_Mac::getRandomFileInDir(const std::string &dirname, const std::string
if(g.gl_pathc > 0)
{
- which_file = gLindenLabRandomNumber.llrand() % g.gl_pathc;
+ which_file = ll_rand(g.gl_pathc);
// llinfos << "getRandomFileInDir: returning number " << which_file << ", path is " << g.gl_pathv[which_file] << llendl;
// The API wants just the filename, not the full path.
diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp
index 0c5b0ecf19..8c2ed48813 100644
--- a/indra/llvfs/lldir_win32.cpp
+++ b/indra/llvfs/lldir_win32.cpp
@@ -266,8 +266,8 @@ BOOL LLDir_Win32::getNextFileInDir(const llutf16string &dirname, const std::stri
// automatically wrap if we've hit the end
void LLDir_Win32::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname)
{
- U32 num_files;
- U32 which_file;
+ S32 num_files;
+ S32 which_file;
HANDLE random_search_h;
fname = "";
@@ -284,7 +284,7 @@ void LLDir_Win32::getRandomFileInDir(const std::string &dirname, const std::stri
return;
}
- which_file = gLindenLabRandomNumber.llrand() % num_files;
+ which_file = ll_rand(num_files);
// llinfos << "Random select mp3 #" << which_file << llendl;