Integrate C++11 branch into 5_1-new

This commit is contained in:
teejusb
2019-06-22 12:35:38 -07:00
444 changed files with 19503 additions and 21007 deletions
+24 -24
View File
@@ -2,7 +2,7 @@
#include "BackgroundUtil.h"
#include "RageUtil.h"
#include "Song.h"
#include "Foreach.h"
#include "IniFile.h"
#include "RageLog.h"
#include <set>
@@ -148,8 +148,8 @@ void BackgroundUtil::GetBackgroundEffects( const RString &_sName, vector<RString
GetDirListing( BACKGROUND_EFFECTS_DIR+sName+".lua", vsPathsOut, false, true );
vsNamesOut.clear();
FOREACH_CONST( RString, vsPathsOut, s )
vsNamesOut.push_back( GetFileNameWithoutExtension(*s) );
for (RString const &s : vsPathsOut)
vsNamesOut.push_back( GetFileNameWithoutExtension(s) );
StripCvsAndSvn( vsPathsOut, vsNamesOut );
}
@@ -166,8 +166,8 @@ void BackgroundUtil::GetBackgroundTransitions( const RString &_sName, vector<RSt
GetDirListing( BACKGROUND_TRANSITIONS_DIR+sName+".lua", vsPathsOut, false, true );
vsNamesOut.clear();
FOREACH_CONST( RString, vsPathsOut, s )
vsNamesOut.push_back( GetFileNameWithoutExtension(*s) );
for (RString const &s : vsPathsOut)
vsNamesOut.push_back( GetFileNameWithoutExtension(s) );
StripCvsAndSvn( vsPathsOut, vsNamesOut );
}
@@ -185,8 +185,8 @@ void BackgroundUtil::GetSongBGAnimations( const Song *pSong, const RString &sMat
}
vsNamesOut.clear();
FOREACH_CONST( RString, vsPathsOut, s )
vsNamesOut.push_back( Basename(*s) );
for (RString const &s : vsPathsOut)
vsNamesOut.push_back( Basename(s) );
StripCvsAndSvn( vsPathsOut, vsNamesOut );
}
@@ -205,8 +205,8 @@ void BackgroundUtil::GetSongMovies( const Song *pSong, const RString &sMatch, ve
}
vsNamesOut.clear();
FOREACH_CONST( RString, vsPathsOut, s )
vsNamesOut.push_back( Basename(*s) );
for (RString const &s : vsPathsOut)
vsNamesOut.push_back( Basename(s) );
StripCvsAndSvn( vsPathsOut, vsNamesOut );
}
@@ -225,8 +225,8 @@ void BackgroundUtil::GetSongBitmaps( const Song *pSong, const RString &sMatch, v
}
vsNamesOut.clear();
FOREACH_CONST( RString, vsPathsOut, s )
vsNamesOut.push_back( Basename(*s) );
for (RString const &s : vsPathsOut)
vsNamesOut.push_back( Basename(s) );
StripCvsAndSvn( vsPathsOut, vsNamesOut );
}
@@ -252,7 +252,7 @@ static void GetFilterToFileNames( const RString sBaseDir, const Song *pSong, set
}
XNode *pSection = ini.GetChild( sSection );
if( pSection == NULL )
if( pSection == nullptr )
{
ASSERT_M( 0, ssprintf("File '%s' refers to a section '%s' that is missing.", sPath.c_str(), sSection.c_str()) );
return;
@@ -270,8 +270,8 @@ void BackgroundUtil::GetGlobalBGAnimations( const Song *pSong, const RString &sM
GetDirListing( BG_ANIMS_DIR+sMatch+"*.xml", vsPathsOut, false, true );
vsNamesOut.clear();
FOREACH_CONST( RString, vsPathsOut, s )
vsNamesOut.push_back( Basename(*s) );
for (RString const &s : vsPathsOut)
vsNamesOut.push_back( Basename(s) );
StripCvsAndSvn( vsPathsOut, vsNamesOut );
}
@@ -313,22 +313,22 @@ namespace {
}
vsDirsToTry.push_back( RANDOMMOVIES_DIR );
FOREACH_CONST( RString, vsDirsToTry, sDir )
for (RString const &sDir : vsDirsToTry)
{
GetDirListing( *sDir+"*.ogv", vsPathsOut, false, true );
GetDirListing( *sDir+"*.avi", vsPathsOut, false, true );
GetDirListing( *sDir+"*.mpg", vsPathsOut, false, true );
GetDirListing( *sDir+"*.mpeg", vsPathsOut, false, true );
GetDirListing( sDir+"*.ogv", vsPathsOut, false, true );
GetDirListing( sDir+"*.avi", vsPathsOut, false, true );
GetDirListing( sDir+"*.mpg", vsPathsOut, false, true );
GetDirListing( sDir+"*.mpeg", vsPathsOut, false, true );
if( !ssFileNameWhitelist.empty() )
{
vector<RString> vsMatches;
FOREACH_CONST( RString, vsPathsOut, s )
for (RString const &s : vsPathsOut)
{
RString sBasename = Basename( *s );
RString sBasename = Basename( s );
bool bFound = ssFileNameWhitelist.find(sBasename) != ssFileNameWhitelist.end();
if( bFound )
vsMatches.push_back(*s);
vsMatches.push_back(s);
}
// If we found any that match the whitelist, use only them.
// If none match the whitelist, ignore the whitelist..
@@ -359,9 +359,9 @@ void BackgroundUtil::GetGlobalRandomMovies(
GetGlobalRandomMoviePaths( pSong, sMatch, vsPathsOut, bTryInsideOfSongGroupAndGenreFirst, bTryInsideOfSongGroupFirst );
FOREACH_CONST( RString, vsPathsOut, s )
for (RString const &s : vsPathsOut)
{
RString sName = s->Right( s->size() - RANDOMMOVIES_DIR.size() - 1 );
RString sName = s.Right( s.size() - RANDOMMOVIES_DIR.size() - 1 );
vsNamesOut.push_back( sName );
}
StripCvsAndSvn( vsPathsOut, vsNamesOut );