summaryrefslogtreecommitdiff
path: root/indra/llvfs/lldir.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-10-11 19:51:07 -0400
committerNat Goodspeed <nat@lindenlab.com>2012-10-11 19:51:07 -0400
commit730d13a76a4b06e6dbdd4bd5829a90bcb98b52b3 (patch)
tree0b13e0f43ea28925bbf7ae2baceb71ac04383855 /indra/llvfs/lldir.cpp
parent949e18d98ad272562628894f4102d3a4314ed7b0 (diff)
Change LLDir::findSkinnedFilenames() to use enum instead of bool.
At Richard's suggestion, changed the bool merge parameter to new enum ESkinConstraint with values CURRENT_SKIN and ALL_SKINS. This clarifies what we're requesting at the point of the call.
Diffstat (limited to 'indra/llvfs/lldir.cpp')
-rw-r--r--indra/llvfs/lldir.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp
index a7d12476a4..2d0adf14e6 100644
--- a/indra/llvfs/lldir.cpp
+++ b/indra/llvfs/lldir.cpp
@@ -46,7 +46,6 @@
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <algorithm>
-#include <iomanip>
#if LL_WINDOWS
#include "lldir_win32.h"
@@ -544,10 +543,10 @@ std::string LLDir::getExtension(const std::string& filepath) const
std::string LLDir::findSkinnedFilenameBaseLang(const std::string &subdir,
const std::string &filename,
- bool merge) const
+ ESkinConstraint constraint) const
{
// This implementation is basically just as described in the declaration comments.
- std::vector<std::string> found(findSkinnedFilenames(subdir, filename, merge));
+ std::vector<std::string> found(findSkinnedFilenames(subdir, filename, constraint));
if (found.empty())
{
return "";
@@ -557,10 +556,10 @@ std::string LLDir::findSkinnedFilenameBaseLang(const std::string &subdir,
std::string LLDir::findSkinnedFilename(const std::string &subdir,
const std::string &filename,
- bool merge) const
+ ESkinConstraint constraint) const
{
// This implementation is basically just as described in the declaration comments.
- std::vector<std::string> found(findSkinnedFilenames(subdir, filename, merge));
+ std::vector<std::string> found(findSkinnedFilenames(subdir, filename, constraint));
if (found.empty())
{
return "";
@@ -570,7 +569,7 @@ std::string LLDir::findSkinnedFilename(const std::string &subdir,
std::vector<std::string> LLDir::findSkinnedFilenames(const std::string& subdir,
const std::string& filename,
- bool merge) const
+ ESkinConstraint constraint) const
{
// Recognize subdirs that have no localization.
static const char* sUnlocalizedData[] =
@@ -582,7 +581,9 @@ std::vector<std::string> LLDir::findSkinnedFilenames(const std::string& subdir,
boost::end(sUnlocalizedData));
LL_DEBUGS("LLDir") << "subdir '" << subdir << "', filename '" << filename
- << "', merge " << std::boolalpha << merge << LL_ENDL;
+ << "', constraint "
+ << ((constraint == CURRENT_SKIN)? "CURRENT_SKIN" : "ALL_SKINS")
+ << LL_ENDL;
// Cache the default language directory for each subdir we've encountered.
// A cache entry whose value is the empty string means "not localized,
@@ -672,8 +673,8 @@ std::vector<std::string> LLDir::findSkinnedFilenames(const std::string& subdir,
// Here the desired filename exists in the first subsubdir. That means
// this is a skindir we want to record in results. But if the caller
- // passed merge=false, we must discard all previous skindirs.
- if (! merge)
+ // passed constraint=CURRENT_SKIN, we must discard all previous skindirs.
+ if (constraint == CURRENT_SKIN)
{
results.clear();
}