flip GetMetric(ref) and GetMetricR(), so there's an interface exposed that doens't

copy the reference.  Copying refs isn't expensive, but it does lock Lua.
This commit is contained in:
Glenn Maynard
2006-09-22 04:46:47 +00:00
parent 6b89313b09
commit 4a9b1736f5
2 changed files with 9 additions and 5 deletions
+8 -4
View File
@@ -971,14 +971,18 @@ RageColor ThemeManager::GetMetricC( const RString &sClassName, const RString &sV
}
LuaReference ThemeManager::GetMetricR( const RString &sClassName, const RString &sValueName )
{
LuaReference ref;
GetMetric( sClassName, sValueName, ref );
return ref;
}
void ThemeManager::GetMetric( const RString &sClassName, const RString &sValueName, LuaReference &valueOut )
{
RString sValue = GetMetricRaw( g_pLoadedThemeData->iniMetrics, sClassName, sValueName );
LuaHelpers::PrepareExpression( sValue );
LuaReference ref;
ref.SetFromExpression( sValue );
return ref;
valueOut.SetFromExpression( sValue );
}
#if !defined(SMPACKAGE)