GetClassFallback -> GetMetricsGroupFallback (Class -> MetricsGroup naming consistency)
This commit is contained in:
@@ -138,7 +138,7 @@ static void FileNameToClassAndElement( const RString &sFileName, RString &sMetri
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static RString ClassAndElementToFileName( const RString &sMetricsGroup, const RString &sElement )
|
static RString MetricsGroupAndElementToFileName( const RString &sMetricsGroup, const RString &sElement )
|
||||||
{
|
{
|
||||||
if( sMetricsGroup.empty() )
|
if( sMetricsGroup.empty() )
|
||||||
return sElement;
|
return sElement;
|
||||||
@@ -523,12 +523,12 @@ try_element_again:
|
|||||||
|
|
||||||
if( bLookingForSpecificFile )
|
if( bLookingForSpecificFile )
|
||||||
{
|
{
|
||||||
GetDirListing( sThemeDir + sCategory+"/"+ClassAndElementToFileName(sMetricsGroup,sElement), asElementPaths, false, true );
|
GetDirListing( sThemeDir + sCategory+"/"+MetricsGroupAndElementToFileName(sMetricsGroup,sElement), asElementPaths, false, true );
|
||||||
}
|
}
|
||||||
else // look for all files starting with sFileName that have types we can use
|
else // look for all files starting with sFileName that have types we can use
|
||||||
{
|
{
|
||||||
vector<RString> asPaths;
|
vector<RString> asPaths;
|
||||||
GetDirListing( sThemeDir + sCategory + "/" + ClassAndElementToFileName(sMetricsGroup,sElement) + "*",
|
GetDirListing( sThemeDir + sCategory + "/" + MetricsGroupAndElementToFileName(sMetricsGroup,sElement) + "*",
|
||||||
asPaths, false, true );
|
asPaths, false, true );
|
||||||
|
|
||||||
for( unsigned p = 0; p < asPaths.size(); ++p )
|
for( unsigned p = 0; p < asPaths.size(); ++p )
|
||||||
@@ -593,7 +593,7 @@ try_element_again:
|
|||||||
RString message = ssprintf(
|
RString message = ssprintf(
|
||||||
"ThemeManager: There is more than one theme element that matches "
|
"ThemeManager: There is more than one theme element that matches "
|
||||||
"'%s/%s/%s'. Please remove all but one of these matches.",
|
"'%s/%s/%s'. Please remove all but one of these matches.",
|
||||||
sThemeName.c_str(), sCategory.c_str(), ClassAndElementToFileName(sMetricsGroup,sElement).c_str() );
|
sThemeName.c_str(), sCategory.c_str(), MetricsGroupAndElementToFileName(sMetricsGroup,sElement).c_str() );
|
||||||
|
|
||||||
switch( Dialog::AbortRetryIgnore(message) )
|
switch( Dialog::AbortRetryIgnore(message) )
|
||||||
{
|
{
|
||||||
@@ -670,13 +670,13 @@ RString ThemeManager::GetPathToAndFallback( ElementCategory category, const RStr
|
|||||||
return RString();
|
return RString();
|
||||||
|
|
||||||
// search fallback name (if any)
|
// search fallback name (if any)
|
||||||
sMetricsGroup = GetClassFallback( sMetricsGroup );
|
sMetricsGroup = GetMetricsGroupFallback( sMetricsGroup );
|
||||||
if( sMetricsGroup.empty() )
|
if( sMetricsGroup.empty() )
|
||||||
return RString();
|
return RString();
|
||||||
}
|
}
|
||||||
|
|
||||||
RageException::Throw( "Infinite recursion looking up theme element \"%s\"",
|
RageException::Throw( "Infinite recursion looking up theme element \"%s\"",
|
||||||
ClassAndElementToFileName(sMetricsGroup, sElement).c_str() );
|
MetricsGroupAndElementToFileName(sMetricsGroup, sElement).c_str() );
|
||||||
/* Not really reached, but Appple's gcc 4 can't figure that out without optimization
|
/* Not really reached, but Appple's gcc 4 can't figure that out without optimization
|
||||||
* even though RE:Throw() is correctly annotated. */
|
* even though RE:Throw() is correctly annotated. */
|
||||||
while( true ) {}
|
while( true ) {}
|
||||||
@@ -689,7 +689,7 @@ RString ThemeManager::GetPath( ElementCategory category, const RString &sMetrics
|
|||||||
const RString sMetricsGroup = sMetricsGroup_;
|
const RString sMetricsGroup = sMetricsGroup_;
|
||||||
const RString sElement = sElement_;
|
const RString sElement = sElement_;
|
||||||
|
|
||||||
RString sFileName = ClassAndElementToFileName( sMetricsGroup, sElement );
|
RString sFileName = MetricsGroupAndElementToFileName( sMetricsGroup, sElement );
|
||||||
|
|
||||||
map<RString, RString> &Cache = g_ThemePathCache[category];
|
map<RString, RString> &Cache = g_ThemePathCache[category];
|
||||||
{
|
{
|
||||||
@@ -793,7 +793,7 @@ void ThemeManager::ReloadMetrics()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
RString ThemeManager::GetClassFallback( const RString &sMetricsGroup )
|
RString ThemeManager::GetMetricsGroupFallback( const RString &sMetricsGroup )
|
||||||
{
|
{
|
||||||
ASSERT( g_pLoadedThemeData );
|
ASSERT( g_pLoadedThemeData );
|
||||||
|
|
||||||
@@ -825,7 +825,7 @@ bool ThemeManager::GetMetricRawRecursive( const IniFile &ini, const RString &sMe
|
|||||||
if( !sValueName.compare("Fallback") )
|
if( !sValueName.compare("Fallback") )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
sMetricsGroup = GetClassFallback( sMetricsGroup );
|
sMetricsGroup = GetMetricsGroupFallback( sMetricsGroup );
|
||||||
if( sMetricsGroup.empty() )
|
if( sMetricsGroup.empty() )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1105,7 +1105,7 @@ void ThemeManager::GetMetricsThatBeginWith( const RString &sMetricsGroup_, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// put the fallback (if any) in sMetricsGroup
|
// put the fallback (if any) in sMetricsGroup
|
||||||
sMetricsGroup = GetClassFallback( sMetricsGroup );
|
sMetricsGroup = GetMetricsGroupFallback( sMetricsGroup );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public:
|
|||||||
|
|
||||||
void GetMetricsThatBeginWith( const RString &sMetricsGroup, const RString &sValueName, set<RString> &vsValueNamesOut );
|
void GetMetricsThatBeginWith( const RString &sMetricsGroup, const RString &sValueName, set<RString> &vsValueNamesOut );
|
||||||
|
|
||||||
RString GetClassFallback( const RString &sMetricsGroup );
|
RString GetMetricsGroupFallback( const RString &sMetricsGroup );
|
||||||
|
|
||||||
static RString GetBlankGraphicPath();
|
static RString GetBlankGraphicPath();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user