From 330978decd15e02d7cd23dcead52dc2373d7e5d5 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 28 Oct 2010 22:40:37 -0400 Subject: STORM-480 remove (unused) LLDir::getRandomFileInDir --HG-- branch : storm-102 --- indra/llvfs/lldir_linux.cpp | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'indra/llvfs/lldir_linux.cpp') diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp index cf5fdd3b4a..73f2336f94 100644 --- a/indra/llvfs/lldir_linux.cpp +++ b/indra/llvfs/lldir_linux.cpp @@ -302,46 +302,7 @@ BOOL LLDir_Linux::getNextFileInDir(const std::string &dirname, const std::string } -// get a random file in the directory -void LLDir_Linux::getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) -{ - S32 num_files; - S32 which_file; - DIR *dirp; - dirent *entryp = NULL; - - fname = ""; - - num_files = countFilesInDir(dirname,mask); - if (!num_files) - { - return; - } - - which_file = ll_rand(num_files); - -// llinfos << "Random select file #" << which_file << llendl; - // which_file now indicates the (zero-based) index to which file to play - - if (!((dirp = opendir(dirname.c_str())))) - { - while (which_file--) - { - if (!((entryp = readdir(dirp)))) - { - return; - } - } - - if ((!which_file) && entryp) - { - fname = entryp->d_name; - } - - closedir(dirp); - } -} std::string LLDir_Linux::getCurPath() { -- cgit v1.2.3