return NULL -> return CString() for clarity and efficiency

This commit is contained in:
Chris Danford
2005-09-04 16:55:21 +00:00
parent c414d1bcf8
commit 48ebc53549
55 changed files with 107 additions and 107 deletions
+4 -4
View File
@@ -43,7 +43,7 @@ CString GetStatsLineTitle( PlayerNumber pn, EndingStatsLine line )
CourseDifficulty cd = (CourseDifficulty)(DIFFICULTY_EASY+line-PERCENT_COMPLETE_EASY);
ASSERT( cd >= 0 && cd < NUM_COURSE_DIFFICULTIES );
if( !GAMESTATE->IsCourseDifficultyShown(cd) )
return NULL;
return CString();
return CourseDifficultyToThemedString(cd);
}
else
@@ -53,7 +53,7 @@ CString GetStatsLineTitle( PlayerNumber pn, EndingStatsLine line )
return DifficultyToThemedString(dc);
}
}
default: ASSERT(0); return NULL;
default: ASSERT(0); return CString();
}
}
@@ -107,7 +107,7 @@ CString GetStatsLineValue( PlayerNumber pn, EndingStatsLine line )
CourseDifficulty cd = (CourseDifficulty)(DIFFICULTY_EASY+line-PERCENT_COMPLETE_EASY);
ASSERT( cd >= 0 && cd < NUM_COURSE_DIFFICULTIES );
if( !GAMESTATE->IsCourseDifficultyShown(cd) )
return NULL;
return CString();
CString sDifficulty = CourseDifficultyToThemedString(cd);
fPercent = pProfile->GetCoursesPercentComplete(st,cd);
}
@@ -120,7 +120,7 @@ CString GetStatsLineValue( PlayerNumber pn, EndingStatsLine line )
}
return ssprintf( "%05.2f%%", fPercent*100 );
}
default: ASSERT(0); return NULL;
default: ASSERT(0); return CString();
}
}