Remove global "using namespace std;" declarations, use "std::" prefixes on all std elements

Fix whitespace changes
This commit is contained in:
Michael Sundqvist
2022-07-10 18:28:56 +03:00
committed by Martin Natano
parent f0680a29fc
commit 0cba3579de
534 changed files with 3456 additions and 3488 deletions
+42 -42
View File
@@ -35,7 +35,7 @@ static bool LoadFromKSFFile( const RString &sPath, Steps &out, Song &song, bool
int iTickCount = -1;
// used to adapt weird tickcounts
//float fScrollRatio = 1.0f; -- uncomment when ready to use.
vector<RString> vNoteRows;
std::vector<RString> vNoteRows;
// According to Aldo_MX, there is a default BPM and it's 60. -aj
bool bDoublesChart = false;
@@ -141,14 +141,14 @@ static bool LoadFromKSFFile( const RString &sPath, Steps &out, Song &song, bool
else if( sValueName=="DIFFICULTY" )
{
out.SetMeter( max(StringToInt(sParams[1]), 1) );
out.SetMeter( std::max(StringToInt(sParams[1]), 1) );
}
// new cases from Aldo_MX's fork:
else if( sValueName=="PLAYER" )
{
RString sPlayer = sParams[1];
sPlayer.MakeLower();
if( sPlayer.find( "double" ) != string::npos )
if( sPlayer.find( "double" ) != std::string::npos )
bDoublesChart = true;
}
// This should always be last.
@@ -189,48 +189,48 @@ static bool LoadFromKSFFile( const RString &sPath, Steps &out, Song &song, bool
out.SetDescription(sFName);
// Check another before anything else... is this okay? -DaisuMaster
if( sFName.find("another") != string::npos )
if( sFName.find("another") != std::string::npos )
{
out.SetDifficulty( Difficulty_Edit );
if( !out.GetMeter() ) out.SetMeter( 25 );
}
else if(sFName.find("wild") != string::npos ||
sFName.find("wd") != string::npos ||
sFName.find("crazy+") != string::npos ||
sFName.find("cz+") != string::npos ||
sFName.find("hardcore") != string::npos )
else if(sFName.find("wild") != std::string::npos ||
sFName.find("wd") != std::string::npos ||
sFName.find("crazy+") != std::string::npos ||
sFName.find("cz+") != std::string::npos ||
sFName.find("hardcore") != std::string::npos )
{
out.SetDifficulty( Difficulty_Challenge );
if( !out.GetMeter() ) out.SetMeter( 20 );
}
else if(sFName.find("crazy") != string::npos ||
sFName.find("cz") != string::npos ||
sFName.find("nightmare") != string::npos ||
sFName.find("nm") != string::npos ||
sFName.find("crazydouble") != string::npos )
else if(sFName.find("crazy") != std::string::npos ||
sFName.find("cz") != std::string::npos ||
sFName.find("nightmare") != std::string::npos ||
sFName.find("nm") != std::string::npos ||
sFName.find("crazydouble") != std::string::npos )
{
out.SetDifficulty( Difficulty_Hard );
if( !out.GetMeter() ) out.SetMeter( 14 ); // Set the meters to the Pump scale, not DDR.
}
else if(sFName.find("hard") != string::npos ||
sFName.find("hd") != string::npos ||
sFName.find("freestyle") != string::npos ||
sFName.find("fs") != string::npos ||
sFName.find("double") != string::npos )
else if(sFName.find("hard") != std::string::npos ||
sFName.find("hd") != std::string::npos ||
sFName.find("freestyle") != std::string::npos ||
sFName.find("fs") != std::string::npos ||
sFName.find("double") != std::string::npos )
{
out.SetDifficulty( Difficulty_Medium );
if( !out.GetMeter() ) out.SetMeter( 8 );
}
else if(sFName.find("easy") != string::npos ||
sFName.find("ez") != string::npos ||
sFName.find("normal") != string::npos )
else if(sFName.find("easy") != std::string::npos ||
sFName.find("ez") != std::string::npos ||
sFName.find("normal") != std::string::npos )
{
// I wonder if I should leave easy fall into the Beginner difficulty... -DaisuMaster
out.SetDifficulty( Difficulty_Easy );
if( !out.GetMeter() ) out.SetMeter( 4 );
}
else if(sFName.find("beginner") != string::npos ||
sFName.find("practice") != string::npos || sFName.find("pr") != string::npos )
else if(sFName.find("beginner") != std::string::npos ||
sFName.find("practice") != std::string::npos || sFName.find("pr") != std::string::npos )
{
out.SetDifficulty( Difficulty_Beginner );
if( !out.GetMeter() ) out.SetMeter( 4 );
@@ -244,22 +244,22 @@ static bool LoadFromKSFFile( const RString &sPath, Steps &out, Song &song, bool
out.m_StepsType = StepsType_pump_single;
// Check for "halfdouble" before "double".
if(sFName.find("halfdouble") != string::npos ||
sFName.find("half-double") != string::npos ||
sFName.find("h_double") != string::npos ||
sFName.find("hdb") != string::npos )
if(sFName.find("halfdouble") != std::string::npos ||
sFName.find("half-double") != std::string::npos ||
sFName.find("h_double") != std::string::npos ||
sFName.find("hdb") != std::string::npos )
out.m_StepsType = StepsType_pump_halfdouble;
// Handle bDoublesChart from above as well. -aj
else if(sFName.find("double") != string::npos ||
sFName.find("nightmare") != string::npos ||
sFName.find("freestyle") != string::npos ||
sFName.find("db") != string::npos ||
sFName.find("nm") != string::npos ||
sFName.find("fs") != string::npos || bDoublesChart )
else if(sFName.find("double") != std::string::npos ||
sFName.find("nightmare") != std::string::npos ||
sFName.find("freestyle") != std::string::npos ||
sFName.find("db") != std::string::npos ||
sFName.find("nm") != std::string::npos ||
sFName.find("fs") != std::string::npos || bDoublesChart )
out.m_StepsType = StepsType_pump_double;
else if( sFName.find("_1") != string::npos )
else if( sFName.find("_1") != std::string::npos )
out.m_StepsType = StepsType_pump_single;
else if( sFName.find("_2") != string::npos )
else if( sFName.find("_2") != std::string::npos )
out.m_StepsType = StepsType_pump_couple;
}
@@ -472,7 +472,7 @@ static void LoadTags( const RString &str, Song &out )
{
/* str is either a #TITLE or a directory component. Fill in missing information.
* str is either "title", "artist - title", or "artist - title - difficulty". */
vector<RString> asBits;
std::vector<RString> asBits;
split( str, " - ", asBits, false );
// Ignore the difficulty, since we get that elsewhere.
if( asBits.size() == 3 && (
@@ -535,7 +535,7 @@ static bool LoadGlobalData( const RString &sPath, Song &out, bool &bKIUCompliant
// changed up there in case of something is found inside the SONGFILE tag in the head ksf -DaisuMaster
// search for music with song in the file name
vector<RString> arrayPossibleMusic;
std::vector<RString> arrayPossibleMusic;
GetDirListing( out.GetSongDir() + RString("song.mp3"), arrayPossibleMusic );
GetDirListing( out.GetSongDir() + RString("song.oga"), arrayPossibleMusic );
GetDirListing( out.GetSongDir() + RString("song.ogg"), arrayPossibleMusic );
@@ -548,7 +548,7 @@ static bool LoadGlobalData( const RString &sPath, Song &out, bool &bKIUCompliant
float SMGap1 = 0, SMGap2 = 0, BPM1 = -1, BPMPos2 = -1, BPM2 = -1, BPMPos3 = -1, BPM3 = -1;
int iTickCount = -1;
bKIUCompliant = false;
vector<RString> vNoteRows;
std::vector<RString> vNoteRows;
for( unsigned i=0; i < msd.GetNumValues(); i++ )
{
@@ -705,7 +705,7 @@ static bool LoadGlobalData( const RString &sPath, Song &out, bool &bKIUCompliant
// Try to fill in missing bits of information from the pathname.
{
vector<RString> asBits;
std::vector<RString> asBits;
split( sPath, "/", asBits, true);
ASSERT( asBits.size() > 1 );
@@ -715,7 +715,7 @@ static bool LoadGlobalData( const RString &sPath, Song &out, bool &bKIUCompliant
return true;
}
void KSFLoader::GetApplicableFiles( const RString &sPath, vector<RString> &out )
void KSFLoader::GetApplicableFiles( const RString &sPath, std::vector<RString> &out )
{
GetDirListing( sPath + RString("*.ksf"), out );
}
@@ -740,7 +740,7 @@ bool KSFLoader::LoadFromDir( const RString &sDir, Song &out )
{
LOG->Trace( "KSFLoader::LoadFromDir(%s)", sDir.c_str() );
vector<RString> arrayKSFFileNames;
std::vector<RString> arrayKSFFileNames;
GetDirListing( sDir + RString("*.ksf"), arrayKSFFileNames );
// We shouldn't have been called to begin with if there were no KSFs.