Integrate C++11 branch into 5_1-new
This commit is contained in:
+9
-9
@@ -23,13 +23,13 @@ LuaXType( Difficulty );
|
||||
|
||||
const RString &CourseDifficultyToLocalizedString( CourseDifficulty x )
|
||||
{
|
||||
static auto_ptr<LocalizedString> g_CourseDifficultyName[NUM_Difficulty];
|
||||
if( g_CourseDifficultyName[0].get() == NULL )
|
||||
static unique_ptr<LocalizedString> g_CourseDifficultyName[NUM_Difficulty];
|
||||
if( g_CourseDifficultyName[0].get() == nullptr )
|
||||
{
|
||||
FOREACH_ENUM( Difficulty,i)
|
||||
{
|
||||
auto_ptr<LocalizedString> ap( new LocalizedString("CourseDifficulty", DifficultyToString(i)) );
|
||||
g_CourseDifficultyName[i] = ap;
|
||||
unique_ptr<LocalizedString> ap( new LocalizedString("CourseDifficulty", DifficultyToString(i)) );
|
||||
g_CourseDifficultyName[i] = move(ap);
|
||||
}
|
||||
}
|
||||
return g_CourseDifficultyName[x]->GetValue();
|
||||
@@ -114,18 +114,18 @@ RString GetCustomDifficulty( StepsType st, Difficulty dc, CourseType ct )
|
||||
// OPTIMIZATION OPPORTUNITY: cache these metrics and cache the splitting
|
||||
vector<RString> vsNames;
|
||||
split( NAMES, ",", vsNames );
|
||||
FOREACH( RString, vsNames, sName )
|
||||
for (RString const &sName: vsNames)
|
||||
{
|
||||
ThemeMetric<StepsType> STEPS_TYPE("CustomDifficulty",(*sName)+"StepsType");
|
||||
ThemeMetric<StepsType> STEPS_TYPE("CustomDifficulty",sName + "StepsType");
|
||||
if( STEPS_TYPE == StepsType_Invalid || st == STEPS_TYPE ) // match
|
||||
{
|
||||
ThemeMetric<Difficulty> DIFFICULTY("CustomDifficulty",(*sName)+"Difficulty");
|
||||
ThemeMetric<Difficulty> DIFFICULTY("CustomDifficulty",sName + "Difficulty");
|
||||
if( DIFFICULTY == Difficulty_Invalid || dc == DIFFICULTY ) // match
|
||||
{
|
||||
ThemeMetric<CourseType> COURSE_TYPE("CustomDifficulty",(*sName)+"CourseType");
|
||||
ThemeMetric<CourseType> COURSE_TYPE("CustomDifficulty",sName + "CourseType");
|
||||
if( COURSE_TYPE == CourseType_Invalid || ct == COURSE_TYPE ) // match
|
||||
{
|
||||
ThemeMetric<RString> STRING("CustomDifficulty",(*sName)+"String");
|
||||
ThemeMetric<RString> STRING("CustomDifficulty",sName + "String");
|
||||
return STRING.GetValue();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user