Explicitly create RStrings to avoid MSVC compiler errors.

This commit is contained in:
Brian Phlipot
2022-08-08 19:42:01 -06:00
committed by teejusb
parent 37aff00d6e
commit c1a3455ce4
5 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -209,7 +209,7 @@ void CourseUtil::SortByMostRecentlyPlayedForMachine( std::vector<Course*> &vpCou
for (Course const * c: vpCoursesInOut)
{
int iNumTimesPlayed = pProfile->GetCourseNumTimesPlayed( c );
RString val = iNumTimesPlayed ? pProfile->GetCourseLastPlayedDateTime(c).GetString() : "9999999999999";
RString val = iNumTimesPlayed ? pProfile->GetCourseLastPlayedDateTime(c).GetString() : RString("9999999999999");
course_sort_val[c] = val;
}
+1 -1
View File
@@ -55,7 +55,7 @@ struct TimingTagWriter {
{ Write( row, ssprintf( "%.6f=%.6f=%hd", a, b, c) ); }
void Init( const RString sTag ) { m_sNext = "#" + sTag + ":"; }
void Finish( ) { m_pvsLines->push_back( ( m_sNext != "," ? m_sNext : "" ) + ";" ); }
void Finish( ) { m_pvsLines->push_back( ( m_sNext != "," ? m_sNext : RString("") ) + ";" ); }
};
+1 -1
View File
@@ -720,7 +720,7 @@ void SongUtil::SortByMostRecentlyPlayedForMachine( std::vector<Song*> &vpSongsIn
for (Song const *s : vpSongsInOut)
{
int iNumTimesPlayed = pProfile->GetSongNumTimesPlayed( s );
RString val = iNumTimesPlayed ? pProfile->GetSongLastPlayedDateTime(s).GetString() : "0";
RString val = iNumTimesPlayed ? pProfile->GetSongLastPlayedDateTime(s).GetString() : RString("0");
g_mapSongSortVal[s] = val;
}
+1 -1
View File
@@ -92,7 +92,7 @@ public:
{
return GetValue();
}
RString const & curLanguage = (THEME && THEME->IsThemeLoaded() ? THEME->GetCurLanguage() : "current");
RString const & curLanguage = (THEME && THEME->IsThemeLoaded() ? THEME->GetCurLanguage() : RString("current"));
LOG->Warn("Missing translation for %s in the %s language.", m_sName.c_str(), curLanguage.c_str());
return m_sName;
}
+7 -7
View File
@@ -417,20 +417,20 @@ RString UnlockEntry::GetDescription() const
default:
FAIL_M(ssprintf("Invalid UnlockRewardType: %i", m_Type));
case UnlockRewardType_Song:
return pSong ? pSong->GetDisplayFullTitle() : "";
return pSong ? pSong->GetDisplayFullTitle() : RString("");
case UnlockRewardType_Steps:
{
StepsType st = GAMEMAN->GetHowToPlayStyleForGame( GAMESTATE->m_pCurGame )->m_StepsType; // TODO: Is this the best thing we can do here?
return (pSong ? pSong->GetDisplayFullTitle() : "") + ", " + CustomDifficultyToLocalizedString( GetCustomDifficulty(st, m_dc, CourseType_Invalid) );
return (pSong ? pSong->GetDisplayFullTitle() : RString("")) + ", " + CustomDifficultyToLocalizedString( GetCustomDifficulty(st, m_dc, CourseType_Invalid) );
}
case UnlockRewardType_Steps_Type:
{
RString ret = (pSong ? pSong->GetDisplayFullTitle() : "");
RString ret = (pSong ? pSong->GetDisplayFullTitle() : RString(""));
ret += "," + CustomDifficultyToLocalizedString( GetCustomDifficulty(m_StepsType, m_dc, CourseType_Invalid) );
return ret + "," + StringConversion::ToString(m_StepsType); // yeah, bit strange.
}
case UnlockRewardType_Course:
return m_Course.IsValid() ? m_Course.ToCourse()->GetDisplayFullTitle() : "";
return m_Course.IsValid() ? m_Course.ToCourse()->GetDisplayFullTitle() : RString("");
case UnlockRewardType_Modifier:
return CommonMetrics::LocalizeOptionItem( GetModifier(), false );
}
@@ -446,9 +446,9 @@ RString UnlockEntry::GetBannerFile() const
case UnlockRewardType_Song:
case UnlockRewardType_Steps:
case UnlockRewardType_Steps_Type:
return pSong ? pSong->GetBannerPath() : "";
return pSong ? pSong->GetBannerPath() : RString("");
case UnlockRewardType_Course:
return m_Course.ToCourse() ? m_Course.ToCourse()->GetBannerPath() : "";
return m_Course.ToCourse() ? m_Course.ToCourse()->GetBannerPath() : RString("");
case UnlockRewardType_Modifier:
return "";
}
@@ -464,7 +464,7 @@ RString UnlockEntry::GetBackgroundFile() const
case UnlockRewardType_Song:
case UnlockRewardType_Steps:
case UnlockRewardType_Steps_Type:
return pSong ? pSong->GetBackgroundPath() : "";
return pSong ? pSong->GetBackgroundPath() : RString("");
case UnlockRewardType_Course:
return "";
case UnlockRewardType_Modifier: