From 9c0ccfae1d14c55ccaf6bc29b54ea1fb8e1363d1 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 23 Feb 2004 08:08:04 +0000 Subject: [PATCH] fix compile, simplify --- stepmania/src/ProfileHtml.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stepmania/src/ProfileHtml.cpp b/stepmania/src/ProfileHtml.cpp index d8e3ae277c..0aca27f048 100644 --- a/stepmania/src/ProfileHtml.cpp +++ b/stepmania/src/ProfileHtml.cpp @@ -1003,7 +1003,10 @@ void PrintCaloriesBurned( RageFile &f, const Profile *pProfile, CString sTitle, Profile::Day day = { when.tm_yday, when.tm_year+1900 }; float fDayCals = pProfile->GetCaloriesBurnedForDay( day ); fWeekCals += fDayCals; - f.Write(""+ssprintf("%f",((fDayCals==0)?"":Commify((int)fDayCals)))+""); + CString sCalories; + if( fDayCals ) + sCalories = Commify( (int)fDayCals ); + f.Write(""+sCalories+""); when = AddDays( when, +1 ); } f.Write(""+Commify((int)fWeekCals)+"");