Require C++20 for building Stepmania.

This commit is contained in:
Brian Phlipot
2022-10-03 16:21:19 -07:00
committed by teejusb
parent 9755acddb7
commit 37aff00d6e
16 changed files with 55 additions and 125 deletions
+10 -6
View File
@@ -368,7 +368,7 @@ static void CourseSortSongs( SongSort sort, std::vector<Song*> &vpPossibleSongs,
{
DEFAULT_FAIL(sort);
case SongSort_Randomize:
random_shuffle( vpPossibleSongs.begin(), vpPossibleSongs.end(), rnd );
shuffle( vpPossibleSongs.begin(), vpPossibleSongs.end(), rnd );
break;
case SongSort_MostPlays:
if( PROFILEMAN )
@@ -428,7 +428,7 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail )
* will change every time it's viewed, and the displayed order will have no
* bearing on what you'll actually play. */
tmp_entries = m_vEntries;
random_shuffle( tmp_entries.begin(), tmp_entries.end(), rnd );
shuffle( tmp_entries.begin(), tmp_entries.end(), rnd );
}
const std::vector<CourseEntry> &entries = m_bShuffle ? tmp_entries:m_vEntries;
@@ -589,8 +589,10 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail )
int iAdd;
if( iMaxDist == iMinDist )
iAdd = iMaxDist;
else
iAdd = rnd( iMaxDist - iMinDist ) + iMinDist;
else {
std::uniform_int_distribution<> dist( iMinDist, iMaxDist );
iAdd = dist( rnd );
}
iLowMeter += iAdd;
iHighMeter += iAdd;
}
@@ -820,8 +822,10 @@ void Course::GetTrailUnsortedEndless( const std::vector<CourseEntry> &entries, T
int iAdd;
if( iMaxDist == iMinDist )
iAdd = iMaxDist;
else
iAdd = rnd( iMaxDist - iMinDist ) + iMinDist;
else {
std::uniform_int_distribution<> dist( iMinDist, iMaxDist );
iAdd = dist( rnd );
}
iLowMeter += iAdd;
iHighMeter += iAdd;
}