remove CStringArray #define

This commit is contained in:
Chris Danford
2005-12-09 21:36:22 +00:00
parent b68e9dd772
commit 37f82b43f7
91 changed files with 227 additions and 228 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ retry:
RageFileManager::FileType ft = FILEMAN->GetFileType( sPath ); RageFileManager::FileType ft = FILEMAN->GetFileType( sPath );
if( ft != RageFileManager::TYPE_FILE && ft != RageFileManager::TYPE_DIR ) if( ft != RageFileManager::TYPE_FILE && ft != RageFileManager::TYPE_DIR )
{ {
CStringArray asPaths; vector<CString> asPaths;
GetDirListing( sPath + "*", asPaths, false, true ); // return path too GetDirListing( sPath + "*", asPaths, false, true ); // return path too
if( asPaths.empty() ) if( asPaths.empty() )
+3 -3
View File
@@ -15,7 +15,7 @@ AnnouncerManager::AnnouncerManager()
LOG->Trace("AnnouncerManager::AnnouncerManager()"); LOG->Trace("AnnouncerManager::AnnouncerManager()");
} }
void AnnouncerManager::GetAnnouncerNames( CStringArray& AddTo ) void AnnouncerManager::GetAnnouncerNames( vector<CString>& AddTo )
{ {
GetDirListing( ANNOUNCERS_DIR+"*", AddTo, true ); GetDirListing( ANNOUNCERS_DIR+"*", AddTo, true );
@@ -32,7 +32,7 @@ bool AnnouncerManager::DoesAnnouncerExist( CString sAnnouncerName )
if( sAnnouncerName == "" ) if( sAnnouncerName == "" )
return true; return true;
CStringArray asAnnouncerNames; vector<CString> asAnnouncerNames;
GetAnnouncerNames( asAnnouncerNames ); GetAnnouncerNames( asAnnouncerNames );
for( unsigned i=0; i<asAnnouncerNames.size(); i++ ) for( unsigned i=0; i<asAnnouncerNames.size(); i++ )
if( 0==stricmp(sAnnouncerName, asAnnouncerNames[i]) ) if( 0==stricmp(sAnnouncerName, asAnnouncerNames[i]) )
@@ -127,7 +127,7 @@ bool AnnouncerManager::HasSoundsFor( CString sFolderName )
void AnnouncerManager::NextAnnouncer() void AnnouncerManager::NextAnnouncer()
{ {
CStringArray as; vector<CString> as;
GetAnnouncerNames( as ); GetAnnouncerNames( as );
if( as.size()==0 ) if( as.size()==0 )
return; return;
+1 -1
View File
@@ -6,7 +6,7 @@ class AnnouncerManager
public: public:
AnnouncerManager(); AnnouncerManager();
void GetAnnouncerNames( CStringArray& AddTo ); void GetAnnouncerNames( vector<CString>& AddTo );
bool DoesAnnouncerExist( CString sAnnouncerName ); bool DoesAnnouncerExist( CString sAnnouncerName );
void SwitchAnnouncer( CString sNewAnnouncerName ); void SwitchAnnouncer( CString sNewAnnouncerName );
CString GetCurAnnouncerName() { return m_sCurAnnouncerName; }; CString GetCurAnnouncerName() { return m_sCurAnnouncerName; };
+1 -1
View File
@@ -123,7 +123,7 @@ void BGAnimation::LoadFromAniDir( const CString &_sAniDir )
// This is an old style BGAnimation (not using .ini) // This is an old style BGAnimation (not using .ini)
// loading a directory of layers // loading a directory of layers
CStringArray asImagePaths; vector<CString> asImagePaths;
ASSERT( sAniDir != "" ); ASSERT( sAniDir != "" );
GetDirListing( sAniDir+"*.png", asImagePaths, false, true ); GetDirListing( sAniDir+"*.png", asImagePaths, false, true );
+2 -2
View File
@@ -324,7 +324,7 @@ bool BackgroundImpl::Layer::CreateBackground( const Song *pSong, const Backgroun
// - song's dir // - song's dir
// - RandomMovies dir // - RandomMovies dir
// - BGAnimations dir. // - BGAnimations dir.
CStringArray vsPaths, vsThrowAway; vector<CString> vsPaths, vsThrowAway;
// Look for BGAnims in the song dir // Look for BGAnims in the song dir
if( sToResolve == SONG_BACKGROUND_FILE ) if( sToResolve == SONG_BACKGROUND_FILE )
@@ -507,7 +507,7 @@ void BackgroundImpl::LoadFromSong( const Song* pSong )
// Choose a bunch of background that we'll use for the random file marker // Choose a bunch of background that we'll use for the random file marker
// //
{ {
CStringArray vsThrowAway, vsNames; vector<CString> vsThrowAway, vsNames;
switch( PREFSMAN->m_RandomBackgroundMode ) switch( PREFSMAN->m_RandomBackgroundMode )
{ {
default: default:
+2 -2
View File
@@ -372,12 +372,12 @@ void BitmapText::SetText( const CString& _sText, const CString& _sAlternateText,
/* It doesn't. I can add Japanese wrapping, at least. We could handle hyphens /* It doesn't. I can add Japanese wrapping, at least. We could handle hyphens
* and soft hyphens and pretty easily, too. -glenn */ * and soft hyphens and pretty easily, too. -glenn */
// TODO: Move this wrapping logic into Font // TODO: Move this wrapping logic into Font
CStringArray asLines; vector<CString> asLines;
split( m_sText, "\n", asLines, false ); split( m_sText, "\n", asLines, false );
for( unsigned line = 0; line < asLines.size(); ++line ) for( unsigned line = 0; line < asLines.size(); ++line )
{ {
CStringArray asWords; vector<CString> asWords;
split( asLines[line], " ", asWords ); split( asLines[line], " ", asWords );
CString sCurLine; CString sCurLine;
+6 -6
View File
@@ -25,7 +25,7 @@ bool Character::Load( CString sCharDir )
} }
{ {
CStringArray as; vector<CString> as;
GetDirListing( m_sCharDir+"card.png", as, false, true ); GetDirListing( m_sCharDir+"card.png", as, false, true );
GetDirListing( m_sCharDir+"card.jpg", as, false, true ); GetDirListing( m_sCharDir+"card.jpg", as, false, true );
GetDirListing( m_sCharDir+"card.gif", as, false, true ); GetDirListing( m_sCharDir+"card.gif", as, false, true );
@@ -37,7 +37,7 @@ bool Character::Load( CString sCharDir )
} }
{ {
CStringArray as; vector<CString> as;
GetDirListing( m_sCharDir+"icon.png", as, false, true ); GetDirListing( m_sCharDir+"icon.png", as, false, true );
GetDirListing( m_sCharDir+"icon.jpg", as, false, true ); GetDirListing( m_sCharDir+"icon.jpg", as, false, true );
GetDirListing( m_sCharDir+"icon.gif", as, false, true ); GetDirListing( m_sCharDir+"icon.gif", as, false, true );
@@ -67,7 +67,7 @@ bool Character::Load( CString sCharDir )
CString GetRandomFileInDir( CString sDir ) CString GetRandomFileInDir( CString sDir )
{ {
CStringArray asFiles; vector<CString> asFiles;
GetDirListing( sDir, asFiles, false, true ); GetDirListing( sDir, asFiles, false, true );
if( asFiles.empty() ) if( asFiles.empty() )
return CString(); return CString();
@@ -90,7 +90,7 @@ CString Character::GetWarmUpAnimationPath() const { return DerefRedir(GetRandomF
CString Character::GetDanceAnimationPath() const { return DerefRedir(GetRandomFileInDir(m_sCharDir + "Dance/")); } CString Character::GetDanceAnimationPath() const { return DerefRedir(GetRandomFileInDir(m_sCharDir + "Dance/")); }
CString Character::GetTakingABreakPath() const CString Character::GetTakingABreakPath() const
{ {
CStringArray as; vector<CString> as;
GetDirListing( m_sCharDir+"break.png", as, false, true ); GetDirListing( m_sCharDir+"break.png", as, false, true );
GetDirListing( m_sCharDir+"break.jpg", as, false, true ); GetDirListing( m_sCharDir+"break.jpg", as, false, true );
GetDirListing( m_sCharDir+"break.gif", as, false, true ); GetDirListing( m_sCharDir+"break.gif", as, false, true );
@@ -103,7 +103,7 @@ CString Character::GetTakingABreakPath() const
CString Character::GetSongSelectIconPath() const CString Character::GetSongSelectIconPath() const
{ {
CStringArray as; vector<CString> as;
// first try and find an icon specific to the select music screen // first try and find an icon specific to the select music screen
// so you can have different icons for music select / char select // so you can have different icons for music select / char select
GetDirListing( m_sCharDir+"selectmusicicon.png", as, false, true ); GetDirListing( m_sCharDir+"selectmusicicon.png", as, false, true );
@@ -129,7 +129,7 @@ CString Character::GetSongSelectIconPath() const
CString Character::GetStageIconPath() const CString Character::GetStageIconPath() const
{ {
CStringArray as; vector<CString> as;
// first try and find an icon specific to the select music screen // first try and find an icon specific to the select music screen
// so you can have different icons for music select / char select // so you can have different icons for music select / char select
GetDirListing( m_sCharDir+"stageicon.png", as, false, true ); GetDirListing( m_sCharDir+"stageicon.png", as, false, true );
+1 -1
View File
@@ -14,7 +14,7 @@ CharacterManager::CharacterManager()
SAFE_DELETE( m_pCharacters[i] ); SAFE_DELETE( m_pCharacters[i] );
m_pCharacters.clear(); m_pCharacters.clear();
CStringArray as; vector<CString> as;
GetDirListing( CHARACTERS_DIR "*", as, true, true ); GetDirListing( CHARACTERS_DIR "*", as, true, true );
StripCvs( as ); StripCvs( as );
+1 -1
View File
@@ -96,7 +96,7 @@ bool CodeItem::Load( CString sButtonsNames )
buttons.clear(); buttons.clear();
const Game* pGame = GAMESTATE->GetCurrentGame(); const Game* pGame = GAMESTATE->GetCurrentGame();
CStringArray asButtonNames; vector<CString> asButtonNames;
bool bHasAPlus = sButtonsNames.Find( '+' ) != -1; bool bHasAPlus = sButtonsNames.Find( '+' ) != -1;
bool bHasADash = sButtonsNames.Find( '-' ) != -1; bool bHasADash = sButtonsNames.Find( '-' ) != -1;
+1 -1
View File
@@ -126,7 +126,7 @@ CString Commands::GetOriginalCommandString() const
void ParseCommands( const CString &sCommands, Commands &vCommandsOut ) void ParseCommands( const CString &sCommands, Commands &vCommandsOut )
{ {
CStringArray vsCommands; vector<CString> vsCommands;
SplitWithQuotes( sCommands, ';', vsCommands, true ); // do ignore empty SplitWithQuotes( sCommands, ';', vsCommands, true ); // do ignore empty
vCommandsOut.v.resize( vsCommands.size() ); vCommandsOut.v.resize( vsCommands.size() );
+3 -3
View File
@@ -37,7 +37,7 @@ void ThemeMetricDifficultiesToShow::Read()
m_v.clear(); m_v.clear();
CStringArray v; vector<CString> v;
split( ThemeMetric<CString>::GetValue(), ",", v ); split( ThemeMetric<CString>::GetValue(), ",", v );
ASSERT( v.size() > 0 ); ASSERT( v.size() > 0 );
@@ -67,7 +67,7 @@ void ThemeMetricCourseDifficultiesToShow::Read()
m_v.clear(); m_v.clear();
CStringArray v; vector<CString> v;
split( ThemeMetric<CString>::GetValue(), ",", v ); split( ThemeMetric<CString>::GetValue(), ",", v );
ASSERT( v.size() > 0 ); ASSERT( v.size() > 0 );
@@ -84,7 +84,7 @@ const vector<CourseDifficulty>& ThemeMetricCourseDifficultiesToShow::GetValue()
static void RemoveStepsTypes( vector<StepsType>& inout, CString sStepsTypesToRemove ) static void RemoveStepsTypes( vector<StepsType>& inout, CString sStepsTypesToRemove )
{ {
CStringArray v; vector<CString> v;
split( sStepsTypesToRemove, ",", v ); split( sStepsTypesToRemove, ",", v );
ASSERT( v.size() > 0 ); ASSERT( v.size() > 0 );
+1 -1
View File
@@ -935,7 +935,7 @@ void Course::UpdateCourseStats( StepsType st )
bool Course::IsRanking() const bool Course::IsRanking() const
{ {
CStringArray rankingsongs; vector<CString> rankingsongs;
split(THEME->GetMetric("ScreenRanking", "CoursesToShow"), ",", rankingsongs); split(THEME->GetMetric("ScreenRanking", "CoursesToShow"), ",", rankingsongs);
+5 -5
View File
@@ -27,7 +27,7 @@ bool CourseLoaderCRS::LoadFromMsd( const CString &sPath, const MsdFile &msd, Cou
{ {
const CString sFName = SetExtension( out.m_sPath, "" ); const CString sFName = SetExtension( out.m_sPath, "" );
CStringArray arrayPossibleBanners; vector<CString> arrayPossibleBanners;
GetDirListing( sFName + "*.png", arrayPossibleBanners, false, true ); GetDirListing( sFName + "*.png", arrayPossibleBanners, false, true );
GetDirListing( sFName + "*.jpg", arrayPossibleBanners, false, true ); GetDirListing( sFName + "*.jpg", arrayPossibleBanners, false, true );
GetDirListing( sFName + "*.bmp", arrayPossibleBanners, false, true ); GetDirListing( sFName + "*.bmp", arrayPossibleBanners, false, true );
@@ -86,7 +86,7 @@ bool CourseLoaderCRS::LoadFromMsd( const CString &sPath, const MsdFile &msd, Cou
float end = -9999; float end = -9999;
for( unsigned j = 1; j < sParams.params.size(); ++j ) for( unsigned j = 1; j < sParams.params.size(); ++j )
{ {
CStringArray sBits; vector<CString> sBits;
split( sParams[j], "=", sBits, false ); split( sParams[j], "=", sBits, false );
if( sBits.size() < 2 ) if( sBits.size() < 2 )
continue; continue;
@@ -149,7 +149,7 @@ bool CourseLoaderCRS::LoadFromMsd( const CString &sPath, const MsdFile &msd, Cou
new_entry.bSecret = true; new_entry.bSecret = true;
CString sSong = sParams[1]; CString sSong = sParams[1];
sSong.Replace( "\\", "/" ); sSong.Replace( "\\", "/" );
CStringArray bits; vector<CString> bits;
split( sSong, "/", bits ); split( sSong, "/", bits );
if( bits.size() == 2 ) if( bits.size() == 2 )
{ {
@@ -206,7 +206,7 @@ bool CourseLoaderCRS::LoadFromMsd( const CString &sPath, const MsdFile &msd, Cou
{ {
/* If "showcourse" or "noshowcourse" is in the list, force new_entry.secret /* If "showcourse" or "noshowcourse" is in the list, force new_entry.secret
* on or off. */ * on or off. */
CStringArray mods; vector<CString> mods;
split( sParams[3], ",", mods, true ); split( sParams[3], ",", mods, true );
for( int j = (int) mods.size()-1; j >= 0 ; --j ) for( int j = (int) mods.size()-1; j >= 0 ; --j )
{ {
@@ -278,7 +278,7 @@ bool CourseLoaderCRS::LoadFromCRSFile( const CString &_sPath, Course &out )
// save group name // save group name
{ {
CStringArray parts; vector<CString> parts;
split( sPath, "/", parts, false ); split( sPath, "/", parts, false );
if( parts.size() >= 4 ) // e.g. "/Courses/blah/fun.cvs" if( parts.size() >= 4 ) // e.g. "/Courses/blah/fun.cvs"
out.m_sGroupName = parts[parts.size()-2]; out.m_sGroupName = parts[parts.size()-2];
+2 -2
View File
@@ -58,7 +58,7 @@ bool CourseWriterCRS::Write( const Course &course, RageFileBasic &f, bool bSavin
StepsType st = entry.first; StepsType st = entry.first;
CourseDifficulty cd = entry.second; CourseDifficulty cd = entry.second;
CStringArray asRadarValues; vector<CString> asRadarValues;
const RadarValues &rv = it->second; const RadarValues &rv = it->second;
for( int r=0; r < NUM_RADAR_CATEGORIES; r++ ) for( int r=0; r < NUM_RADAR_CATEGORIES; r++ )
asRadarValues.push_back( ssprintf("%.3f", rv[r]) ); asRadarValues.push_back( ssprintf("%.3f", rv[r]) );
@@ -103,7 +103,7 @@ bool CourseWriterCRS::Write( const Course &course, RageFileBasic &f, bool bSavin
else if( entry.pSong ) else if( entry.pSong )
{ {
// strip off everything but the group name and song dir // strip off everything but the group name and song dir
CStringArray as; vector<CString> as;
ASSERT( entry.pSong != NULL ); ASSERT( entry.pSong != NULL );
split( entry.pSong->GetSongDir(), "/", as ); split( entry.pSong->GetSongDir(), "/", as );
ASSERT( as.size() >= 2 ); ASSERT( as.size() >= 2 );
+1 -1
View File
@@ -102,7 +102,7 @@ private:
Difficulty dc; Difficulty dc;
}; };
CStringArray m_sGroups; vector<CString> m_sGroups;
vector<Song*> m_pSongs; vector<Song*> m_pSongs;
vector<StepsType> m_StepsTypes; vector<StepsType> m_StepsTypes;
vector<StepsAndDifficulty> m_vpSteps; vector<StepsAndDifficulty> m_vpSteps;
+5 -5
View File
@@ -333,10 +333,10 @@ void Font::SetDefaultGlyph( FontPage *pPage )
/* Given the INI for a font, find all of the texture pages for the font. */ /* Given the INI for a font, find all of the texture pages for the font. */
void Font::GetFontPaths( const CString &sFontIniPath, CStringArray &asTexturePathsOut ) void Font::GetFontPaths( const CString &sFontIniPath, vector<CString> &asTexturePathsOut )
{ {
CString sPrefix = SetExtension( sFontIniPath, "" ); CString sPrefix = SetExtension( sFontIniPath, "" );
CStringArray asFiles; vector<CString> asFiles;
GetDirListing( sPrefix + "*", asFiles, false, true ); GetDirListing( sPrefix + "*", asFiles, false, true );
for( unsigned i = 0; i < asFiles.size(); ++i ) for( unsigned i = 0; i < asFiles.size(); ++i )
@@ -628,7 +628,7 @@ CString FontPageSettings::MapRange( CString sMapping, int iMapOffset, int iGlyph
return CString(); return CString();
} }
static CStringArray LoadStack; static vector<CString> LoadStack;
/* /*
* A font set is a set of files, eg: * A font set is a set of files, eg:
@@ -671,7 +671,7 @@ void Font::Load( const CString &sIniPath, CString sChars )
m_sChars = sChars; m_sChars = sChars;
/* Get the filenames associated with this font. */ /* Get the filenames associated with this font. */
CStringArray asTexturePaths; vector<CString> asTexturePaths;
GetFontPaths( sIniPath, asTexturePaths ); GetFontPaths( sIniPath, asTexturePaths );
bool bCapitalsOnly = false; bool bCapitalsOnly = false;
@@ -688,7 +688,7 @@ void Font::Load( const CString &sIniPath, CString sChars )
{ {
/* If this is a top-level font (not a subfont), load the default font first. */ /* If this is a top-level font (not a subfont), load the default font first. */
CStringArray ImportList; vector<CString> ImportList;
if( LoadStack.size() == 1 ) if( LoadStack.size() == 1 )
ImportList.push_back("Common default"); ImportList.push_back("Common default");
+1 -1
View File
@@ -159,7 +159,7 @@ private:
CString m_sChars; CString m_sChars;
void LoadFontPageSettings( FontPageSettings &cfg, IniFile &ini, const CString &sTexturePath, const CString &PageName, CString sChars ); void LoadFontPageSettings( FontPageSettings &cfg, IniFile &ini, const CString &sTexturePath, const CString &PageName, CString sChars );
static void GetFontPaths( const CString &sFontOrTextureFilePath, CStringArray &sTexturePaths ); static void GetFontPaths( const CString &sFontOrTextureFilePath, vector<CString> &sTexturePaths );
CString GetPageNameFromFileName( const CString &sFilename ); CString GetPageNameFromFileName( const CString &sFilename );
}; };
+1 -1
View File
@@ -2713,7 +2713,7 @@ const Game* GameManager::GetGameFromIndex( int index ) const
bool GameManager::IsGameEnabled( const Game *pGame ) const bool GameManager::IsGameEnabled( const Game *pGame ) const
{ {
CStringArray asNoteSkins; vector<CString> asNoteSkins;
NOTESKIN->GetNoteSkinNames( pGame, asNoteSkins, false ); /* don't omit default */ NOTESKIN->GetNoteSkinNames( pGame, asNoteSkins, false ); /* don't omit default */
return asNoteSkins.size() > 0; return asNoteSkins.size() > 0;
} }
+1 -1
View File
@@ -261,7 +261,7 @@ static void DoPlayOnceFromDir( CString sPath )
if( sPath.Right(1) != "/" ) if( sPath.Right(1) != "/" )
sPath += "/"; sPath += "/";
CStringArray arraySoundFiles; vector<CString> arraySoundFiles;
GetDirListing( sPath + "*.mp3", arraySoundFiles ); GetDirListing( sPath + "*.mp3", arraySoundFiles );
GetDirListing( sPath + "*.wav", arraySoundFiles ); GetDirListing( sPath + "*.wav", arraySoundFiles );
GetDirListing( sPath + "*.ogg", arraySoundFiles ); GetDirListing( sPath + "*.ogg", arraySoundFiles );
+1 -1
View File
@@ -44,7 +44,7 @@ bool GroupList::ItemIsOnScreen( int n ) const
return offset >= 0 && offset < MAX_GROUPS_ONSCREEN; return offset >= 0 && offset < MAX_GROUPS_ONSCREEN;
} }
void GroupList::Load( const CStringArray& asGroupNames ) void GroupList::Load( const vector<CString>& asGroupNames )
{ {
m_asLabels = asGroupNames; m_asLabels = asGroupNames;
+1 -1
View File
@@ -34,7 +34,7 @@ public:
CString GetSelectionName() const { return m_asLabels[m_iSelection]; } CString GetSelectionName() const { return m_asLabels[m_iSelection]; }
void Up(); void Up();
void Down(); void Down();
void Load( const CStringArray& asGroupNames ); void Load( const vector<CString>& asGroupNames );
void TweenOffScreen(); void TweenOffScreen();
void TweenOnScreen(); void TweenOnScreen();
}; };
+2 -2
View File
@@ -35,7 +35,7 @@ void HelpDisplay::SetName( const CString &sName )
BitmapText::SetName( sName ); BitmapText::SetName( sName );
} }
void HelpDisplay::SetTips( const CStringArray &arrayTips, const CStringArray &arrayTipsAlt ) void HelpDisplay::SetTips( const vector<CString> &arrayTips, const vector<CString> &arrayTipsAlt )
{ {
ASSERT( arrayTips.size() == arrayTipsAlt.size() ); ASSERT( arrayTips.size() == arrayTipsAlt.size() );
@@ -117,7 +117,7 @@ public:
static int gettips( T* p, lua_State *L ) static int gettips( T* p, lua_State *L )
{ {
CStringArray arrayTips, arrayTipsAlt; vector<CString> arrayTips, arrayTipsAlt;
p->GetTips( arrayTips, arrayTipsAlt ); p->GetTips( arrayTips, arrayTipsAlt );
LuaHelpers::CreateTableFromArray( arrayTips, L ); LuaHelpers::CreateTableFromArray( arrayTips, L );
+4 -4
View File
@@ -18,9 +18,9 @@ public:
void LoadFromNode( const CString& sDir, const XNode* pNode ); void LoadFromNode( const CString& sDir, const XNode* pNode );
virtual Actor *Copy() const; virtual Actor *Copy() const;
void SetTips( const CStringArray &arrayTips ) { SetTips( arrayTips, arrayTips ); } void SetTips( const vector<CString> &arrayTips ) { SetTips( arrayTips, arrayTips ); }
void SetTips( const CStringArray &arrayTips, const CStringArray &arrayTipsAlt ); void SetTips( const vector<CString> &arrayTips, const vector<CString> &arrayTipsAlt );
void GetTips( CStringArray &arrayTipsOut, CStringArray &arrayTipsAltOut ) const { arrayTipsOut = m_arrayTips; arrayTipsAltOut = m_arrayTipsAlt; } void GetTips( vector<CString> &arrayTipsOut, vector<CString> &arrayTipsAltOut ) const { arrayTipsOut = m_arrayTips; arrayTipsAltOut = m_arrayTipsAlt; }
virtual void Update( float fDeltaTime ); virtual void Update( float fDeltaTime );
virtual void SetName( const CString &sName ); virtual void SetName( const CString &sName );
@@ -31,7 +31,7 @@ public:
protected: protected:
ThemeMetric<float> TIP_SHOW_TIME; ThemeMetric<float> TIP_SHOW_TIME;
CStringArray m_arrayTips, m_arrayTipsAlt; vector<CString> m_arrayTips, m_arrayTipsAlt;
int m_iCurTipIndex; int m_iCurTipIndex;
float m_fSecsUntilSwitch; float m_fSecsUntilSwitch;
+1 -1
View File
@@ -462,7 +462,7 @@ void InputMapper::ReadMappingsFromDisk()
GameInput GameI; GameInput GameI;
GameI.fromString( pGame, name ); GameI.fromString( pGame, name );
CStringArray sDeviceInputStrings; vector<CString> sDeviceInputStrings;
split( value, ",", sDeviceInputStrings, false ); split( value, ",", sDeviceInputStrings, false );
for( unsigned i=0; i<sDeviceInputStrings.size() && i<unsigned(NUM_GAME_TO_DEVICE_SLOTS); i++ ) for( unsigned i=0; i<sDeviceInputStrings.size() && i<unsigned(NUM_GAME_TO_DEVICE_SLOTS); i++ )
+1 -1
View File
@@ -215,7 +215,7 @@ and once only.
void MusicBannerWheel::LoadSongData() void MusicBannerWheel::LoadSongData()
{ {
Song* pSong = NULL; Song* pSong = NULL;
CStringArray asGraphicPaths; vector<CString> asGraphicPaths;
if(MAXSONGSINBUFFER >= arraySongs.size() && SingleLoad != 1) // less than the MAXSONGSINBUFFER means we can get away with loading the lot in one go if(MAXSONGSINBUFFER >= arraySongs.size() && SingleLoad != 1) // less than the MAXSONGSINBUFFER means we can get away with loading the lot in one go
{ {
+2 -2
View File
@@ -68,7 +68,7 @@ void NoteDataUtil::LoadFromSMNoteDataString( NoteData &out, CString sSMNoteData
sSMNoteData.erase( iIndexCommentStart, iIndexCommentEnd-iIndexCommentStart ); sSMNoteData.erase( iIndexCommentStart, iIndexCommentEnd-iIndexCommentStart );
} }
CStringArray asMeasures; vector<CString> asMeasures;
split( sSMNoteData, ",", asMeasures, true ); // ignore empty is important split( sSMNoteData, ",", asMeasures, true ); // ignore empty is important
for( unsigned m=0; m<asMeasures.size(); m++ ) // foreach measure for( unsigned m=0; m<asMeasures.size(); m++ ) // foreach measure
{ {
@@ -76,7 +76,7 @@ void NoteDataUtil::LoadFromSMNoteDataString( NoteData &out, CString sSMNoteData
TrimLeft(sMeasureString); TrimLeft(sMeasureString);
TrimRight(sMeasureString); TrimRight(sMeasureString);
CStringArray asMeasureLines; vector<CString> asMeasureLines;
split( sMeasureString, "\n", asMeasureLines, true ); // ignore empty is important split( sMeasureString, "\n", asMeasureLines, true ); // ignore empty is important
for( unsigned l=0; l<asMeasureLines.size(); l++ ) for( unsigned l=0; l<asMeasureLines.size(); l++ )
+6 -6
View File
@@ -40,7 +40,7 @@ void NoteSkinManager::RefreshNoteSkinData( const Game* pGame )
g_PathCache.clear(); g_PathCache.clear();
CString sBaseSkinFolder = NOTESKINS_DIR + pGame->m_szName + "/"; CString sBaseSkinFolder = NOTESKINS_DIR + pGame->m_szName + "/";
CStringArray asNoteSkinNames; vector<CString> asNoteSkinNames;
GetDirListing( sBaseSkinFolder + "*", asNoteSkinNames, true ); GetDirListing( sBaseSkinFolder + "*", asNoteSkinNames, true );
StripCvs( asNoteSkinNames ); StripCvs( asNoteSkinNames );
@@ -96,12 +96,12 @@ void NoteSkinManager::LoadNoteSkinDataRecursive( const CString &sNoteSkinName, N
} }
void NoteSkinManager::GetNoteSkinNames( CStringArray &AddTo ) void NoteSkinManager::GetNoteSkinNames( vector<CString> &AddTo )
{ {
GetNoteSkinNames( GAMESTATE->m_pCurGame, AddTo ); GetNoteSkinNames( GAMESTATE->m_pCurGame, AddTo );
} }
void NoteSkinManager::GetNoteSkinNames( const Game* pGame, CStringArray &AddTo, bool bFilterDefault ) void NoteSkinManager::GetNoteSkinNames( const Game* pGame, vector<CString> &AddTo, bool bFilterDefault )
{ {
if( pGame == m_pCurGame ) if( pGame == m_pCurGame )
{ {
@@ -121,7 +121,7 @@ void NoteSkinManager::GetNoteSkinNames( const Game* pGame, CStringArray &AddTo,
/* Move "default" to the front if it exists. */ /* Move "default" to the front if it exists. */
{ {
CStringArray::iterator iter = find( AddTo.begin(), AddTo.end(), "default" ); vector<CString>::iterator iter = find( AddTo.begin(), AddTo.end(), "default" );
if( iter != AddTo.end() ) if( iter != AddTo.end() )
{ {
AddTo.erase( iter ); AddTo.erase( iter );
@@ -134,7 +134,7 @@ void NoteSkinManager::GetNoteSkinNames( const Game* pGame, CStringArray &AddTo,
bool NoteSkinManager::DoesNoteSkinExist( const CString &sSkinName ) bool NoteSkinManager::DoesNoteSkinExist( const CString &sSkinName )
{ {
CStringArray asSkinNames; vector<CString> asSkinNames;
GetNoteSkinNames( asSkinNames ); GetNoteSkinNames( asSkinNames );
for( unsigned i=0; i<asSkinNames.size(); i++ ) for( unsigned i=0; i<asSkinNames.size(); i++ )
if( 0==stricmp(sSkinName, asSkinNames[i]) ) if( 0==stricmp(sSkinName, asSkinNames[i]) )
@@ -278,7 +278,7 @@ try_again:
CString NoteSkinManager::GetPathFromDirAndFile( const CString &sDir, const CString &sFileName ) CString NoteSkinManager::GetPathFromDirAndFile( const CString &sDir, const CString &sFileName )
{ {
CStringArray matches; // fill this with the possible files vector<CString> matches; // fill this with the possible files
GetDirListing( sDir+sFileName+"*", matches, false, true ); GetDirListing( sDir+sFileName+"*", matches, false, true );
+2 -2
View File
@@ -19,8 +19,8 @@ public:
~NoteSkinManager(); ~NoteSkinManager();
void RefreshNoteSkinData( const Game* game ); void RefreshNoteSkinData( const Game* game );
void GetNoteSkinNames( const Game* game, CStringArray &AddTo, bool bFilterDefault=true ); void GetNoteSkinNames( const Game* game, vector<CString> &AddTo, bool bFilterDefault=true );
void GetNoteSkinNames( CStringArray &AddTo ); // looks up current const Game* in GAMESTATE void GetNoteSkinNames( vector<CString> &AddTo ); // looks up current const Game* in GAMESTATE
bool DoesNoteSkinExist( const CString &sNoteSkin ); // looks up current const Game* in GAMESTATE bool DoesNoteSkinExist( const CString &sNoteSkin ); // looks up current const Game* in GAMESTATE
void SetCurrentNoteSkin( const CString &sNoteSkin ) { m_sCurrentNoteSkin = sNoteSkin; } void SetCurrentNoteSkin( const CString &sNoteSkin ) { m_sCurrentNoteSkin = sNoteSkin; }
+1 -1
View File
@@ -5,7 +5,7 @@
bool NotesLoader::Loadable( CString sPath ) bool NotesLoader::Loadable( CString sPath )
{ {
CStringArray list; vector<CString> list;
GetApplicableFiles( sPath, list ); GetApplicableFiles( sPath, list );
return !list.empty(); return !list.empty();
} }
+1 -1
View File
@@ -11,7 +11,7 @@ class Song;
class NotesLoader class NotesLoader
{ {
protected: protected:
virtual void GetApplicableFiles( CString sPath, CStringArray &out )=0; virtual void GetApplicableFiles( CString sPath, vector<CString> &out )=0;
set<istring> BlacklistedImages; set<istring> BlacklistedImages;
+2 -2
View File
@@ -512,7 +512,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, const NameToData_t &mapNa
return true; return true;
} }
void BMSLoader::GetApplicableFiles( CString sPath, CStringArray &out ) void BMSLoader::GetApplicableFiles( CString sPath, vector<CString> &out )
{ {
GetDirListing( sPath + CString("*.bms"), out ); GetDirListing( sPath + CString("*.bms"), out );
GetDirListing( sPath + CString("*.bme"), out ); GetDirListing( sPath + CString("*.bme"), out );
@@ -852,7 +852,7 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
ASSERT( out.m_vsKeysoundFile.empty() ); ASSERT( out.m_vsKeysoundFile.empty() );
m_sDir = sDir; m_sDir = sDir;
CStringArray arrayBMSFileNames; vector<CString> arrayBMSFileNames;
GetApplicableFiles( sDir, arrayBMSFileNames ); GetApplicableFiles( sDir, arrayBMSFileNames );
/* We should have at least one; if we had none, we shouldn't have been /* We should have at least one; if we had none, we shouldn't have been
+1 -1
View File
@@ -32,7 +32,7 @@ class BMSLoader: public NotesLoader
map<CString,int> m_mapWavIdToKeysoundIndex; map<CString,int> m_mapWavIdToKeysoundIndex;
public: public:
void GetApplicableFiles( CString sPath, CStringArray &out ); void GetApplicableFiles( CString sPath, vector<CString> &out );
bool LoadFromDir( CString sDir, Song &out ); bool LoadFromDir( CString sDir, Song &out );
}; };
+6 -6
View File
@@ -442,12 +442,12 @@ bool DWILoader::LoadFromDWIFile( CString sPath, Song &out )
else if( 0==stricmp(sValueName,"FREEZE") ) else if( 0==stricmp(sValueName,"FREEZE") )
{ {
CStringArray arrayFreezeExpressions; vector<CString> arrayFreezeExpressions;
split( sParams[1], ",", arrayFreezeExpressions ); split( sParams[1], ",", arrayFreezeExpressions );
for( unsigned f=0; f<arrayFreezeExpressions.size(); f++ ) for( unsigned f=0; f<arrayFreezeExpressions.size(); f++ )
{ {
CStringArray arrayFreezeValues; vector<CString> arrayFreezeValues;
split( arrayFreezeExpressions[f], "=", arrayFreezeValues ); split( arrayFreezeExpressions[f], "=", arrayFreezeValues );
if( arrayFreezeValues.size() != 2 ) if( arrayFreezeValues.size() != 2 )
{ {
@@ -464,12 +464,12 @@ bool DWILoader::LoadFromDWIFile( CString sPath, Song &out )
else if( 0==stricmp(sValueName,"CHANGEBPM") || 0==stricmp(sValueName,"BPMCHANGE") ) else if( 0==stricmp(sValueName,"CHANGEBPM") || 0==stricmp(sValueName,"BPMCHANGE") )
{ {
CStringArray arrayBPMChangeExpressions; vector<CString> arrayBPMChangeExpressions;
split( sParams[1], ",", arrayBPMChangeExpressions ); split( sParams[1], ",", arrayBPMChangeExpressions );
for( unsigned b=0; b<arrayBPMChangeExpressions.size(); b++ ) for( unsigned b=0; b<arrayBPMChangeExpressions.size(); b++ )
{ {
CStringArray arrayBPMChangeValues; vector<CString> arrayBPMChangeValues;
split( arrayBPMChangeExpressions[b], "=", arrayBPMChangeValues ); split( arrayBPMChangeExpressions[b], "=", arrayBPMChangeValues );
if( arrayBPMChangeValues.size() != 2 ) if( arrayBPMChangeValues.size() != 2 )
{ {
@@ -536,14 +536,14 @@ bool DWILoader::LoadFromDWIFile( CString sPath, Song &out )
return true; return true;
} }
void DWILoader::GetApplicableFiles( CString sPath, CStringArray &out ) void DWILoader::GetApplicableFiles( CString sPath, vector<CString> &out )
{ {
GetDirListing( sPath + CString("*.dwi"), out ); GetDirListing( sPath + CString("*.dwi"), out );
} }
bool DWILoader::LoadFromDir( CString sPath, Song &out ) bool DWILoader::LoadFromDir( CString sPath, Song &out )
{ {
CStringArray aFileNames; vector<CString> aFileNames;
GetApplicableFiles( sPath, aFileNames ); GetApplicableFiles( sPath, aFileNames );
if( aFileNames.size() > 1 ) if( aFileNames.size() > 1 )
+1 -1
View File
@@ -26,7 +26,7 @@ class DWILoader: public NotesLoader
CString m_sLoadingFile; CString m_sLoadingFile;
public: public:
void GetApplicableFiles( CString sPath, CStringArray &out ); void GetApplicableFiles( CString sPath, vector<CString> &out );
bool Loadable( CString sPath ); bool Loadable( CString sPath );
bool LoadFromDir( CString sPath, Song &out ); bool LoadFromDir( CString sPath, Song &out );
}; };
+6 -6
View File
@@ -68,7 +68,7 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Steps &out, const Song &s
RageException::Throw( "Error opening file '%s'.", sPath.c_str() ); RageException::Throw( "Error opening file '%s'.", sPath.c_str() );
int iTickCount = -1; // this is the value we read for TICKCOUNT int iTickCount = -1; // this is the value we read for TICKCOUNT
CStringArray asRows; vector<CString> asRows;
for( unsigned i=0; i<msd.GetNumValues(); i++ ) for( unsigned i=0; i<msd.GetNumValues(); i++ )
{ {
@@ -220,7 +220,7 @@ bool KSFLoader::LoadFromKSFFile( const CString &sPath, Steps &out, const Song &s
return true; return true;
} }
void KSFLoader::GetApplicableFiles( CString sPath, CStringArray &out ) void KSFLoader::GetApplicableFiles( CString sPath, vector<CString> &out )
{ {
GetDirListing( sPath + CString("*.ksf"), out ); GetDirListing( sPath + CString("*.ksf"), out );
} }
@@ -229,7 +229,7 @@ void KSFLoader::LoadTags( const CString &str, Song &out )
{ {
/* str is either a #TITLE or a directory component. Fill in missing information. /* str is either a #TITLE or a directory component. Fill in missing information.
* str is either "title", "artist - title", or "artist - title - difficulty". */ * str is either "title", "artist - title", or "artist - title - difficulty". */
CStringArray asBits; vector<CString> asBits;
split( str, " - ", asBits, false ); split( str, " - ", asBits, false );
/* Ignore the difficulty, since we get that elsewhere. */ /* Ignore the difficulty, since we get that elsewhere. */
if( asBits.size() == 3 && if( asBits.size() == 3 &&
@@ -323,7 +323,7 @@ bool KSFLoader::LoadGlobalData( const CString &sPath, Song &out )
/* Try to fill in missing bits of information from the pathname. */ /* Try to fill in missing bits of information from the pathname. */
{ {
CStringArray asBits; vector<CString> asBits;
split( sPath, "/", asBits, true); split( sPath, "/", asBits, true);
ASSERT(asBits.size() > 1); ASSERT(asBits.size() > 1);
@@ -331,7 +331,7 @@ bool KSFLoader::LoadGlobalData( const CString &sPath, Song &out )
} }
// search for music with song in the file name // search for music with song in the file name
CStringArray arrayPossibleMusic; vector<CString> arrayPossibleMusic;
GetDirListing( out.GetSongDir() + CString("song.mp3"), arrayPossibleMusic ); GetDirListing( out.GetSongDir() + CString("song.mp3"), arrayPossibleMusic );
GetDirListing( out.GetSongDir() + CString("song.ogg"), arrayPossibleMusic ); GetDirListing( out.GetSongDir() + CString("song.ogg"), arrayPossibleMusic );
GetDirListing( out.GetSongDir() + CString("song.wav"), arrayPossibleMusic ); GetDirListing( out.GetSongDir() + CString("song.wav"), arrayPossibleMusic );
@@ -346,7 +346,7 @@ bool KSFLoader::LoadFromDir( CString sDir, Song &out )
{ {
LOG->Trace( "Song::LoadFromKSFDir(%s)", sDir.c_str() ); LOG->Trace( "Song::LoadFromKSFDir(%s)", sDir.c_str() );
CStringArray arrayKSFFileNames; vector<CString> arrayKSFFileNames;
GetDirListing( sDir + CString("*.ksf"), arrayKSFFileNames ); GetDirListing( sDir + CString("*.ksf"), arrayKSFFileNames );
/* We shouldn't have been called to begin with if there were no KSFs. */ /* We shouldn't have been called to begin with if there were no KSFs. */
+1 -1
View File
@@ -17,7 +17,7 @@ class KSFLoader: public NotesLoader
void LoadTags( const CString &str, Song &out ); void LoadTags( const CString &str, Song &out );
public: public:
void GetApplicableFiles( CString sPath, CStringArray &out ); void GetApplicableFiles( CString sPath, vector<CString> &out );
bool LoadFromDir( CString sDir, Song &out ); bool LoadFromDir( CString sDir, Song &out );
}; };
+11 -11
View File
@@ -47,7 +47,7 @@ void SMLoader::LoadFromSMTokens(
out.SetDifficulty( DIFFICULTY_CHALLENGE ); out.SetDifficulty( DIFFICULTY_CHALLENGE );
out.SetMeter(atoi(sMeter)); out.SetMeter(atoi(sMeter));
CStringArray saValues; vector<CString> saValues;
split( sRadarValues, ",", saValues, true ); split( sRadarValues, ",", saValues, true );
if( saValues.size() == NUM_RADAR_CATEGORIES ) if( saValues.size() == NUM_RADAR_CATEGORIES )
{ {
@@ -62,7 +62,7 @@ void SMLoader::LoadFromSMTokens(
out.TidyUpData(); out.TidyUpData();
} }
void SMLoader::GetApplicableFiles( CString sPath, CStringArray &out ) void SMLoader::GetApplicableFiles( CString sPath, vector<CString> &out )
{ {
GetDirListing( sPath + CString("*.sm"), out ); GetDirListing( sPath + CString("*.sm"), out );
} }
@@ -99,12 +99,12 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out )
} }
else if( sValueName=="STOPS" || sValueName=="FREEZES" ) else if( sValueName=="STOPS" || sValueName=="FREEZES" )
{ {
CStringArray arrayFreezeExpressions; vector<CString> arrayFreezeExpressions;
split( sParams[1], ",", arrayFreezeExpressions ); split( sParams[1], ",", arrayFreezeExpressions );
for( unsigned f=0; f<arrayFreezeExpressions.size(); f++ ) for( unsigned f=0; f<arrayFreezeExpressions.size(); f++ )
{ {
CStringArray arrayFreezeValues; vector<CString> arrayFreezeValues;
split( arrayFreezeExpressions[f], "=", arrayFreezeValues ); split( arrayFreezeExpressions[f], "=", arrayFreezeValues );
/* XXX: Once we have a way to display warnings that the user actually /* XXX: Once we have a way to display warnings that the user actually
* cares about (unlike most warnings), this should be one of them. */ * cares about (unlike most warnings), this should be one of them. */
@@ -130,12 +130,12 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out )
else if( sValueName=="BPMS" ) else if( sValueName=="BPMS" )
{ {
CStringArray arrayBPMChangeExpressions; vector<CString> arrayBPMChangeExpressions;
split( sParams[1], ",", arrayBPMChangeExpressions ); split( sParams[1], ",", arrayBPMChangeExpressions );
for( unsigned b=0; b<arrayBPMChangeExpressions.size(); b++ ) for( unsigned b=0; b<arrayBPMChangeExpressions.size(); b++ )
{ {
CStringArray arrayBPMChangeValues; vector<CString> arrayBPMChangeValues;
split( arrayBPMChangeExpressions[b], "=", arrayBPMChangeValues ); split( arrayBPMChangeExpressions[b], "=", arrayBPMChangeValues );
/* XXX: Once we have a way to display warnings that the user actually /* XXX: Once we have a way to display warnings that the user actually
* cares about (unlike most warnings), this should be one of them. */ * cares about (unlike most warnings), this should be one of them. */
@@ -161,7 +161,7 @@ void SMLoader::LoadTimingFromSMFile( const MsdFile &msd, TimingData &out )
bool LoadFromBGChangesString( BackgroundChange &change, const CString &sBGChangeExpression ) bool LoadFromBGChangesString( BackgroundChange &change, const CString &sBGChangeExpression )
{ {
CStringArray aBGChangeValues; vector<CString> aBGChangeValues;
split( sBGChangeExpression, "=", aBGChangeValues, false ); split( sBGChangeExpression, "=", aBGChangeValues, false );
aBGChangeValues.resize( min((int)aBGChangeValues.size(),11) ); aBGChangeValues.resize( min((int)aBGChangeValues.size(),11) );
@@ -377,7 +377,7 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
} }
else else
{ {
CStringArray aBGChangeExpressions; vector<CString> aBGChangeExpressions;
split( sParams[1], ",", aBGChangeExpressions ); split( sParams[1], ",", aBGChangeExpressions );
for( unsigned b=0; b<aBGChangeExpressions.size(); b++ ) for( unsigned b=0; b<aBGChangeExpressions.size(); b++ )
@@ -391,7 +391,7 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
else if( sValueName=="FGCHANGES" ) else if( sValueName=="FGCHANGES" )
{ {
CStringArray aFGChangeExpressions; vector<CString> aFGChangeExpressions;
split( sParams[1], ",", aFGChangeExpressions ); split( sParams[1], ",", aFGChangeExpressions );
for( unsigned b=0; b<aFGChangeExpressions.size(); b++ ) for( unsigned b=0; b<aFGChangeExpressions.size(); b++ )
@@ -404,7 +404,7 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
else if( sValueName=="KEYSOUNDS" ) else if( sValueName=="KEYSOUNDS" )
{ {
CStringArray aKeysoundFiles; vector<CString> aKeysoundFiles;
split( sParams[1], ",", aKeysoundFiles ); split( sParams[1], ",", aKeysoundFiles );
for( unsigned k=0; k<aKeysoundFiles.size(); k++ ) for( unsigned k=0; k<aKeysoundFiles.size(); k++ )
@@ -446,7 +446,7 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out )
bool SMLoader::LoadFromDir( CString sPath, Song &out ) bool SMLoader::LoadFromDir( CString sPath, Song &out )
{ {
CStringArray aFileNames; vector<CString> aFileNames;
GetApplicableFiles( sPath, aFileNames ); GetApplicableFiles( sPath, aFileNames );
if( aFileNames.size() > 1 ) if( aFileNames.size() > 1 )
+1 -1
View File
@@ -33,7 +33,7 @@ public:
return LoadFromSMFile( sPath, out ); return LoadFromSMFile( sPath, out );
} }
void GetApplicableFiles( CString sPath, CStringArray &out ); void GetApplicableFiles( CString sPath, vector<CString> &out );
bool LoadFromDir( CString sPath, Song &out ); bool LoadFromDir( CString sPath, Song &out );
void TidyUpData( Song &song, bool cache ); void TidyUpData( Song &song, bool cache );
static bool LoadTimingFromFile( const CString &fn, TimingData &out ); static bool LoadTimingFromFile( const CString &fn, TimingData &out );
+1 -1
View File
@@ -170,7 +170,7 @@ CString NotesWriterSM::GetSMNotesTag( const Song &song, const Steps &in, bool bS
lines.push_back( ssprintf( " %d:", in.GetMeter() ) ); lines.push_back( ssprintf( " %d:", in.GetMeter() ) );
int MaxRadar = bSavingCache? NUM_RADAR_CATEGORIES:5; int MaxRadar = bSavingCache? NUM_RADAR_CATEGORIES:5;
CStringArray asRadarValues; vector<CString> asRadarValues;
for( int r=0; r < MaxRadar; r++ ) for( int r=0; r < MaxRadar; r++ )
asRadarValues.push_back( ssprintf("%.3f", in.GetRadarValues()[r]) ); asRadarValues.push_back( ssprintf("%.3f", in.GetRadarValues()[r]) );
/* Don't append a newline here; it's added in NoteDataUtil::GetSMNoteDataString. /* Don't append a newline here; it's added in NoteDataUtil::GetSMNoteDataString.
+1 -1
View File
@@ -103,7 +103,7 @@ void OptionIconRow::SetFromGameState( PlayerNumber pn )
// init // init
CString sOptions = GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.GetString(); CString sOptions = GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.GetString();
CStringArray asOptions; vector<CString> asOptions;
split( sOptions, ", ", asOptions, true ); split( sOptions, ", ", asOptions, true );
+1 -1
View File
@@ -277,7 +277,7 @@ public:
defOut.m_bOneChoiceForAllPlayers = false; defOut.m_bOneChoiceForAllPlayers = false;
defOut.m_bAllowThemeItems = false; // we theme the text ourself defOut.m_bAllowThemeItems = false; // we theme the text ourself
CStringArray arraySkinNames; vector<CString> arraySkinNames;
NOTESKIN->GetNoteSkinNames( arraySkinNames ); NOTESKIN->GetNoteSkinNames( arraySkinNames );
for( unsigned skin=0; skin<arraySkinNames.size(); skin++ ) for( unsigned skin=0; skin<arraySkinNames.size(); skin++ )
{ {
+3 -3
View File
@@ -205,7 +205,7 @@ void PlayerOptions::FromString( CString sOptions, bool bWarnOnInvalid )
ASSERT( NOTESKIN ); ASSERT( NOTESKIN );
// Init(); // Init();
sOptions.MakeLower(); sOptions.MakeLower();
CStringArray asBits; vector<CString> asBits;
split( sOptions, ",", asBits, true ); split( sOptions, ",", asBits, true );
FOREACH( CString, asBits, bit ) FOREACH( CString, asBits, bit )
@@ -221,7 +221,7 @@ void PlayerOptions::FromString( CString sOptions, bool bWarnOnInvalid )
float level = 1; float level = 1;
float speed = 1; float speed = 1;
CStringArray asParts; vector<CString> asParts;
split( sBit, " ", asParts, true ); split( sBit, " ", asParts, true );
FOREACH_CONST( CString, asParts, s ) FOREACH_CONST( CString, asParts, s )
@@ -624,7 +624,7 @@ void PlayerOptions::GetThemedMods( vector<CString> &AddTo ) const
ASSERT( !sOneMod.empty() ); ASSERT( !sOneMod.empty() );
CStringArray asTokens; vector<CString> asTokens;
split( sOneMod, " ", asTokens ); split( sOneMod, " ", asTokens );
if( asTokens.empty() ) if( asTokens.empty() )
+2 -2
View File
@@ -66,7 +66,7 @@ CString RadarValues::ToString( int iMaxValues ) const
iMaxValues = NUM_RADAR_CATEGORIES; iMaxValues = NUM_RADAR_CATEGORIES;
iMaxValues = min( iMaxValues, (int)NUM_RADAR_CATEGORIES ); iMaxValues = min( iMaxValues, (int)NUM_RADAR_CATEGORIES );
CStringArray asRadarValues; vector<CString> asRadarValues;
for( int r=0; r < iMaxValues; r++ ) for( int r=0; r < iMaxValues; r++ )
asRadarValues.push_back( ssprintf("%.3f", m_Values.f[r]) ); asRadarValues.push_back( ssprintf("%.3f", m_Values.f[r]) );
@@ -75,7 +75,7 @@ CString RadarValues::ToString( int iMaxValues ) const
void RadarValues::FromString( CString sRadarValues ) void RadarValues::FromString( CString sRadarValues )
{ {
CStringArray saValues; vector<CString> saValues;
split( sRadarValues, ",", saValues, true ); split( sRadarValues, ",", saValues, true );
if( saValues.size() != NUM_RADAR_CATEGORIES ) if( saValues.size() != NUM_RADAR_CATEGORIES )
+1 -1
View File
@@ -42,7 +42,7 @@ int RageFileDriver::GetPathValue( const CString &path )
return 0; return 0;
} }
void RageFileDriver::GetDirListing( const CString &sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo ) void RageFileDriver::GetDirListing( const CString &sPath, vector<CString> &AddTo, bool bOnlyDirs, bool bReturnPathToo )
{ {
FDB->GetDirListing( sPath, AddTo, bOnlyDirs, bReturnPathToo ); FDB->GetDirListing( sPath, AddTo, bOnlyDirs, bReturnPathToo );
} }
+1 -1
View File
@@ -13,7 +13,7 @@ public:
RageFileDriver( FilenameDB *db ) { FDB = db; } RageFileDriver( FilenameDB *db ) { FDB = db; }
virtual ~RageFileDriver(); virtual ~RageFileDriver();
virtual RageFileBasic *Open( const CString &path, int mode, int &err ) = 0; virtual RageFileBasic *Open( const CString &path, int mode, int &err ) = 0;
virtual void GetDirListing( const CString &sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo ); virtual void GetDirListing( const CString &sPath, vector<CString> &AddTo, bool bOnlyDirs, bool bReturnPathToo );
virtual RageFileManager::FileType GetFileType( const CString &sPath ); virtual RageFileManager::FileType GetFileType( const CString &sPath );
virtual int GetFileSizeInBytes( const CString &sFilePath ); virtual int GetFileSizeInBytes( const CString &sFilePath );
virtual int GetFileHash( const CString &sPath ); virtual int GetFileHash( const CString &sPath );
@@ -119,7 +119,7 @@ bool WinMoveFile( CString sOldPath, CString sNewPath )
bool CreateDirectories( CString Path ) bool CreateDirectories( CString Path )
{ {
/* XXX: handle "//foo/bar" paths in Windows */ /* XXX: handle "//foo/bar" paths in Windows */
CStringArray parts; vector<CString> parts;
CString curpath; CString curpath;
/* If Path is absolute, add the initial slash ("ignore empty" will remove it). */ /* If Path is absolute, add the initial slash ("ignore empty" will remove it). */
+5 -5
View File
@@ -294,7 +294,7 @@ static void NormalizePath( CString &sPath )
bool ilt( const CString &a, const CString &b ) { return a.CompareNoCase(b) < 0; } bool ilt( const CString &a, const CString &b ) { return a.CompareNoCase(b) < 0; }
bool ieq( const CString &a, const CString &b ) { return a.CompareNoCase(b) == 0; } bool ieq( const CString &a, const CString &b ) { return a.CompareNoCase(b) == 0; }
void RageFileManager::GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo ) void RageFileManager::GetDirListing( CString sPath, vector<CString> &AddTo, bool bOnlyDirs, bool bReturnPathToo )
{ {
NormalizePath( sPath ); NormalizePath( sPath );
@@ -334,7 +334,7 @@ void RageFileManager::GetDirListing( CString sPath, CStringArray &AddTo, bool bO
{ {
/* More than one driver returned files. Remove duplicates (case-insensitively). */ /* More than one driver returned files. Remove duplicates (case-insensitively). */
sort( AddTo.begin()+iOldSize, AddTo.end(), ilt ); sort( AddTo.begin()+iOldSize, AddTo.end(), ilt );
CStringArray::iterator it = unique( AddTo.begin()+iOldSize, AddTo.end(), ieq ); vector<CString>::iterator it = unique( AddTo.begin()+iOldSize, AddTo.end(), ieq );
AddTo.erase( it, AddTo.end() ); AddTo.erase( it, AddTo.end() );
} }
} }
@@ -827,12 +827,12 @@ unsigned GetFileSizeInBytes( const CString &sPath )
return FILEMAN->GetFileSizeInBytes( sPath ); return FILEMAN->GetFileSizeInBytes( sPath );
} }
void GetDirListing( const CString &sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo ) void GetDirListing( const CString &sPath, vector<CString> &AddTo, bool bOnlyDirs, bool bReturnPathToo )
{ {
FILEMAN->GetDirListing( sPath, AddTo, bOnlyDirs, bReturnPathToo ); FILEMAN->GetDirListing( sPath, AddTo, bOnlyDirs, bReturnPathToo );
} }
void GetDirListingRecursive( const CString &sDir, const CString &sMatch, CStringArray &AddTo ) void GetDirListingRecursive( const CString &sDir, const CString &sMatch, vector<CString> &AddTo )
{ {
ASSERT( sDir.Right(1) == "/" ); ASSERT( sDir.Right(1) == "/" );
GetDirListing( sDir+sMatch, AddTo, false, true ); GetDirListing( sDir+sMatch, AddTo, false, true );
@@ -883,7 +883,7 @@ unsigned int GetHashForDirectory( const CString &sDir )
hash += GetHashForString( sDir ); hash += GetHashForString( sDir );
CStringArray arrayFiles; vector<CString> arrayFiles;
GetDirListing( sDir+"*", arrayFiles, false ); GetDirListing( sDir+"*", arrayFiles, false );
for( unsigned i=0; i<arrayFiles.size(); i++ ) for( unsigned i=0; i<arrayFiles.size(); i++ )
{ {
+1 -1
View File
@@ -19,7 +19,7 @@ public:
~RageFileManager(); ~RageFileManager();
void MountInitialFilesystems(); void MountInitialFilesystems();
void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo ); void GetDirListing( CString sPath, vector<CString> &AddTo, bool bOnlyDirs, bool bReturnPathToo );
bool Move( CString sOldPath, CString sNewPath ); bool Move( CString sOldPath, CString sNewPath );
bool Remove( CString sPath ); bool Remove( CString sPath );
void CreateDir( CString sDir ); void CreateDir( CString sDir );
+1 -1
View File
@@ -52,7 +52,7 @@ void RageTexture::CreateFrameRects()
void RageTexture::GetFrameDimensionsFromFileName( CString sPath, int* piFramesWide, int* piFramesHigh ) void RageTexture::GetFrameDimensionsFromFileName( CString sPath, int* piFramesWide, int* piFramesHigh )
{ {
static Regex match( " ([0-9]+)x([0-9]+)([\\. ]|$)" ); static Regex match( " ([0-9]+)x([0-9]+)([\\. ]|$)" );
CStringArray asMatch; vector<CString> asMatch;
if( !match.Compare(sPath, asMatch) ) if( !match.Compare(sPath, asMatch) )
{ {
*piFramesWide = *piFramesHigh = 1; *piFramesWide = *piFramesHigh = 1;
+7 -7
View File
@@ -108,7 +108,7 @@ bool IsHexVal( const CString &s )
float HHMMSSToSeconds( const CString &sHHMMSS ) float HHMMSSToSeconds( const CString &sHHMMSS )
{ {
CStringArray arrayBits; vector<CString> arrayBits;
split( sHHMMSS, ":", arrayBits, false ); split( sHHMMSS, ":", arrayBits, false );
while( arrayBits.size() < 3 ) while( arrayBits.size() < 3 )
@@ -457,7 +457,7 @@ CString GetLanguageNameFromISO639Code( CString sName )
return ""; return "";
} }
CString join( const CString &Deliminator, const CStringArray& Source) CString join( const CString &Deliminator, const vector<CString>& Source)
{ {
if( Source.empty() ) if( Source.empty() )
return CString(); return CString();
@@ -473,7 +473,7 @@ CString join( const CString &Deliminator, const CStringArray& Source)
return csTmp; return csTmp;
} }
CString join( const CString &Delimitor, CStringArray::const_iterator begin, CStringArray::const_iterator end ) CString join( const CString &Delimitor, vector<CString>::const_iterator begin, vector<CString>::const_iterator end )
{ {
if( begin == end ) if( begin == end )
return CString(); return CString();
@@ -540,7 +540,7 @@ void do_split( const S &Source, const C Delimitor, vector<S> &AddIt, const bool
} }
void split( const CString &Source, const CString &Delimitor, CStringArray &AddIt, const bool bIgnoreEmpty ) void split( const CString &Source, const CString &Delimitor, vector<CString> &AddIt, const bool bIgnoreEmpty )
{ {
if( Delimitor.size() == 1 ) if( Delimitor.size() == 1 )
do_split( Source, Delimitor[0], AddIt, bIgnoreEmpty ); do_split( Source, Delimitor[0], AddIt, bIgnoreEmpty );
@@ -634,7 +634,7 @@ void splitpath( const CString &Path, CString& Dir, CString& Filename, CString& E
{ {
Dir = Filename = Ext = ""; Dir = Filename = Ext = "";
CStringArray mat; vector<CString> mat;
/* One level of escapes for the regex, one for C. Ew. /* One level of escapes for the regex, one for C. Ew.
* This is really: * This is really:
@@ -802,7 +802,7 @@ bool DirectoryIsEmpty( const CString &dir )
if(!DoesFileExist(dir)) if(!DoesFileExist(dir))
return true; return true;
CStringArray asFileNames; vector<CString> asFileNames;
GetDirListing( dir, asFileNames ); GetDirListing( dir, asFileNames );
return asFileNames.empty(); return asFileNames.empty();
} }
@@ -817,7 +817,7 @@ bool CompareCStringsDesc(const CString &str1, const CString &str2)
return str1.CompareNoCase( str2 ) > 0; return str1.CompareNoCase( str2 ) > 0;
} }
void SortCStringArray( CStringArray &arrayCStrings, const bool bSortAscending ) void SortCStringArray( vector<CString> &arrayCStrings, const bool bSortAscending )
{ {
sort( arrayCStrings.begin(), arrayCStrings.end(), sort( arrayCStrings.begin(), arrayCStrings.end(),
bSortAscending?CompareCStringsAsc:CompareCStringsDesc); bSortAscending?CompareCStringsAsc:CompareCStringsDesc);
+8 -8
View File
@@ -280,8 +280,8 @@ wstring CStringToWstring( const CString &sString );
CString GetLanguageNameFromISO639Code( CString sName ); CString GetLanguageNameFromISO639Code( CString sName );
// Splits a CString into an CStringArray according the Delimitor. // Splits a CString into an vector<CString> according the Delimitor.
void split( const CString &sSource, const CString &sDelimitor, CStringArray& asAddIt, const bool bIgnoreEmpty = true ); void split( const CString &sSource, const CString &sDelimitor, vector<CString>& asAddIt, const bool bIgnoreEmpty = true );
void split( const wstring &sSource, const wstring &sDelimitor, vector<wstring> &asAddIt, const bool bIgnoreEmpty = true ); void split( const wstring &sSource, const wstring &sDelimitor, vector<wstring> &asAddIt, const bool bIgnoreEmpty = true );
/* In-place split. */ /* In-place split. */
@@ -292,9 +292,9 @@ void split( const wstring &sSource, const wstring &sDelimitor, int &iBegin, int
void split( const CString &sSource, const CString &sDelimitor, int &iBegin, int &iSize, int iLen, const bool bIgnoreEmpty ); /* no default to avoid ambiguity */ void split( const CString &sSource, const CString &sDelimitor, int &iBegin, int &iSize, int iLen, const bool bIgnoreEmpty ); /* no default to avoid ambiguity */
void split( const wstring &sSource, const wstring &sDelimitor, int &iBegin, int &iSize, int iLen, const bool bIgnoreEmpty ); void split( const wstring &sSource, const wstring &sDelimitor, int &iBegin, int &iSize, int iLen, const bool bIgnoreEmpty );
// Joins a CStringArray to create a CString according the Deliminator. // Joins a vector<CString> to create a CString according the Deliminator.
CString join( const CString &sDelimitor, const CStringArray& sSource ); CString join( const CString &sDelimitor, const vector<CString>& sSource );
CString join( const CString &sDelimitor, CStringArray::const_iterator begin, CStringArray::const_iterator end ); CString join( const CString &sDelimitor, vector<CString>::const_iterator begin, vector<CString>::const_iterator end );
CString GetCwd(); CString GetCwd();
@@ -311,7 +311,7 @@ bool DirectoryIsEmpty( const CString &sPath );
bool CompareCStringsAsc( const CString &sStr1, const CString &sStr2 ); bool CompareCStringsAsc( const CString &sStr1, const CString &sStr2 );
bool CompareCStringsDesc( const CString &sStr1, const CString &sStr2 ); bool CompareCStringsDesc( const CString &sStr1, const CString &sStr2 );
void SortCStringArray( CStringArray &asAddTo, const bool bSortAscending = true ); void SortCStringArray( vector<CString> &asAddTo, const bool bSortAscending = true );
/* Find the mean and standard deviation of all numbers in [start,end). */ /* Find the mean and standard deviation of all numbers in [start,end). */
float calc_mean( const float *pStart, const float *pEnd ); float calc_mean( const float *pStart, const float *pEnd );
@@ -424,8 +424,8 @@ typedef basic_string<char,char_traits_char_nocase> istring;
/* Compatibility/convenience shortcuts. These are actually defined in RageFileManager.h, but /* Compatibility/convenience shortcuts. These are actually defined in RageFileManager.h, but
* declared here since they're used in many places. */ * declared here since they're used in many places. */
void GetDirListing( const CString &sPath, CStringArray &AddTo, bool bOnlyDirs=false, bool bReturnPathToo=false ); void GetDirListing( const CString &sPath, vector<CString> &AddTo, bool bOnlyDirs=false, bool bReturnPathToo=false );
void GetDirListingRecursive( const CString &sDir, const CString &sMatch, CStringArray &AddTo ); /* returns path too */ void GetDirListingRecursive( const CString &sDir, const CString &sMatch, vector<CString> &AddTo ); /* returns path too */
bool DeleteRecursive( const CString &sDir ); /* delete the dir and all files/subdirs inside it */ bool DeleteRecursive( const CString &sDir ); /* delete the dir and all files/subdirs inside it */
bool DoesFileExist( const CString &sPath ); bool DoesFileExist( const CString &sPath );
bool IsAFile( const CString &sPath ); bool IsAFile( const CString &sPath );
+1 -1
View File
@@ -101,7 +101,7 @@ static bool AttemptJapaneseConversion( CString &txt ) { return false; }
bool ConvertString(CString &str, const CString &encodings) bool ConvertString(CString &str, const CString &encodings)
{ {
CStringArray lst; vector<CString> lst;
split(encodings, ",", lst); split(encodings, ",", lst);
for(unsigned i = 0; i < lst.size(); ++i) for(unsigned i = 0; i < lst.size(); ++i)
+3 -3
View File
@@ -386,8 +386,8 @@ void FilenameDB::AddFile( const CString &sPath_, int iSize, int iHash, void *pPr
vector<CString> asParts; vector<CString> asParts;
split( sPath, "/", asParts, false ); split( sPath, "/", asParts, false );
CStringArray::const_iterator begin = asParts.begin(); vector<CString>::const_iterator begin = asParts.begin();
CStringArray::const_iterator end = asParts.end(); vector<CString>::const_iterator end = asParts.end();
bool IsDir = true; bool IsDir = true;
if( sPath[sPath.size()-1] != '/' ) if( sPath[sPath.size()-1] != '/' )
@@ -545,7 +545,7 @@ const void *FilenameDB::GetFilePriv( const CString &path )
void FilenameDB::GetDirListing( CString sPath, CStringArray &asAddTo, bool bOnlyDirs, bool bReturnPathToo ) void FilenameDB::GetDirListing( CString sPath, vector<CString> &asAddTo, bool bOnlyDirs, bool bReturnPathToo )
{ {
// LOG->Trace( "GetDirListing( %s )", sPath.c_str() ); // LOG->Trace( "GetDirListing( %s )", sPath.c_str() );
+1 -1
View File
@@ -103,7 +103,7 @@ public:
RageFileManager::FileType GetFileType( const CString &sPath ); RageFileManager::FileType GetFileType( const CString &sPath );
int GetFileSize( const CString &sPath ); int GetFileSize( const CString &sPath );
int GetFileHash( const CString &sFilePath ); int GetFileHash( const CString &sFilePath );
void GetDirListing( CString sPath, CStringArray &asAddTo, bool bOnlyDirs, bool bReturnPathToo ); void GetDirListing( CString sPath, vector<CString> &asAddTo, bool bOnlyDirs, bool bReturnPathToo );
void FlushDirCache(); void FlushDirCache();
+1 -1
View File
@@ -51,7 +51,7 @@ bool RandomSample::LoadSoundDir( CString sDir, int iMaxToLoad )
sDir += "/"; sDir += "/";
#endif #endif
CStringArray arraySoundFiles; vector<CString> arraySoundFiles;
GetDirListing( sDir + "*.mp3", arraySoundFiles ); GetDirListing( sDir + "*.mp3", arraySoundFiles );
GetDirListing( sDir + "*.ogg", arraySoundFiles ); GetDirListing( sDir + "*.ogg", arraySoundFiles );
GetDirListing( sDir + "*.wav", arraySoundFiles ); GetDirListing( sDir + "*.wav", arraySoundFiles );
+1 -1
View File
@@ -26,7 +26,7 @@ ScoreDisplayBattle::ScoreDisplayBattle()
this->AddChild( &m_ItemIcon[i] ); this->AddChild( &m_ItemIcon[i] );
} }
CStringArray asIconPaths; vector<CString> asIconPaths;
GetDirListing( THEME->GetCurThemeDir()+"Graphic/ScoreDisplayBattle icon*", asIconPaths ); GetDirListing( THEME->GetCurThemeDir()+"Graphic/ScoreDisplayBattle icon*", asIconPaths );
for( unsigned j=0; j<asIconPaths.size(); j++ ) for( unsigned j=0; j<asIconPaths.size(); j++ )
m_TexturePreload.Load( asIconPaths[j] ); m_TexturePreload.Load( asIconPaths[j] );
+1 -1
View File
@@ -25,7 +25,7 @@ void ScreenCenterImage::Init()
ScreenWithMenuElements::Init(); ScreenWithMenuElements::Init();
#if defined(XBOX) #if defined(XBOX)
CStringArray strArray; vector<CString> strArray;
CString text("Use the left analog stick to translate the screen and right right analog stick to scale"); CString text("Use the left analog stick to translate the screen and right right analog stick to scale");
strArray.push_back(text); strArray.push_back(text);
m_textHelp->SetTips(strArray); m_textHelp->SetTips(strArray);
+1 -1
View File
@@ -36,7 +36,7 @@ protected:
void UpdateOptions( PlayerNumber pn, int nosound ); void UpdateOptions( PlayerNumber pn, int nosound );
CString sOptions; CString sOptions;
CStringArray asOptions; vector<CString> asOptions;
void TweenOffScreen(); void TweenOffScreen();
+2 -2
View File
@@ -32,13 +32,13 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ):
void ScreenOptionsMaster::Init() void ScreenOptionsMaster::Init()
{ {
CStringArray asLineNames; vector<CString> asLineNames;
split( LINE_NAMES, ",", asLineNames ); split( LINE_NAMES, ",", asLineNames );
if( asLineNames.empty() ) if( asLineNames.empty() )
RageException::Throw( "%s::LineNames is empty.", m_sName.c_str() ); RageException::Throw( "%s::LineNames is empty.", m_sName.c_str() );
CStringArray Flags; vector<CString> Flags;
split( OPTION_MENU_FLAGS, ";", Flags, true ); split( OPTION_MENU_FLAGS, ";", Flags, true );
InputMode im = INPUTMODE_INDIVIDUAL; InputMode im = INPUTMODE_INDIVIDUAL;
bool Explanations = false; bool Explanations = false;
+13 -13
View File
@@ -24,7 +24,7 @@ static void GetPrefsDefaultModifiers( PlayerOptions &po, SongOptions &so )
static void SetPrefsDefaultModifiers( const PlayerOptions &po, const SongOptions &so ) static void SetPrefsDefaultModifiers( const PlayerOptions &po, const SongOptions &so )
{ {
CStringArray as; vector<CString> as;
if( po.GetString() != "" ) if( po.GetString() != "" )
as.push_back( po.GetString() ); as.push_back( po.GetString() );
if( so.GetString() != "" ) if( so.GetString() != "" )
@@ -119,7 +119,7 @@ static void MovePref( int &iSel, bool bToSel, const ConfOption *pConfOption )
} }
} }
static void GameChoices( CStringArray &out ) static void GameChoices( vector<CString> &out )
{ {
vector<const Game*> aGames; vector<const Game*> aGames;
GAMEMAN->GetEnabledGames( aGames ); GAMEMAN->GetEnabledGames( aGames );
@@ -133,7 +133,7 @@ static void GameChoices( CStringArray &out )
static void GameSel( int &sel, bool ToSel, const ConfOption *pConfOption ) static void GameSel( int &sel, bool ToSel, const ConfOption *pConfOption )
{ {
CStringArray choices; vector<CString> choices;
pConfOption->MakeOptionsList( choices ); pConfOption->MakeOptionsList( choices );
if( ToSel ) if( ToSel )
@@ -151,14 +151,14 @@ static void GameSel( int &sel, bool ToSel, const ConfOption *pConfOption )
} }
} }
static void LanguageChoices( CStringArray &out ) static void LanguageChoices( vector<CString> &out )
{ {
THEME->GetLanguages( out ); THEME->GetLanguages( out );
} }
static void Language( int &sel, bool ToSel, const ConfOption *pConfOption ) static void Language( int &sel, bool ToSel, const ConfOption *pConfOption )
{ {
CStringArray choices; vector<CString> choices;
pConfOption->MakeOptionsList( choices ); pConfOption->MakeOptionsList( choices );
if( ToSel ) if( ToSel )
@@ -175,12 +175,12 @@ static void Language( int &sel, bool ToSel, const ConfOption *pConfOption )
} }
} }
static void ThemeChoices( CStringArray &out ) static void ThemeChoices( vector<CString> &out )
{ {
THEME->GetThemeNames( out ); THEME->GetThemeNames( out );
} }
static void DisplayResolutionChoices( CStringArray &out ) static void DisplayResolutionChoices( vector<CString> &out )
{ {
DisplayResolutions d; DisplayResolutions d;
DISPLAY->GetDisplayResolutions( d ); DISPLAY->GetDisplayResolutions( d );
@@ -194,7 +194,7 @@ static void DisplayResolutionChoices( CStringArray &out )
static void Theme( int &sel, bool ToSel, const ConfOption *pConfOption ) static void Theme( int &sel, bool ToSel, const ConfOption *pConfOption )
{ {
CStringArray choices; vector<CString> choices;
pConfOption->MakeOptionsList( choices ); pConfOption->MakeOptionsList( choices );
if( ToSel ) if( ToSel )
@@ -210,7 +210,7 @@ static void Theme( int &sel, bool ToSel, const ConfOption *pConfOption )
} }
} }
static void AnnouncerChoices( CStringArray &out ) static void AnnouncerChoices( vector<CString> &out )
{ {
ANNOUNCER->GetAnnouncerNames( out ); ANNOUNCER->GetAnnouncerNames( out );
out.insert( out.begin(), "Off" ); out.insert( out.begin(), "Off" );
@@ -218,7 +218,7 @@ static void AnnouncerChoices( CStringArray &out )
static void Announcer( int &sel, bool ToSel, const ConfOption *pConfOption ) static void Announcer( int &sel, bool ToSel, const ConfOption *pConfOption )
{ {
CStringArray choices; vector<CString> choices;
pConfOption->MakeOptionsList( choices ); pConfOption->MakeOptionsList( choices );
if( ToSel ) if( ToSel )
@@ -233,7 +233,7 @@ static void Announcer( int &sel, bool ToSel, const ConfOption *pConfOption )
} }
} }
static void DefaultNoteSkinChoices( CStringArray &out ) static void DefaultNoteSkinChoices( vector<CString> &out )
{ {
NOTESKIN->GetNoteSkinNames( out ); NOTESKIN->GetNoteSkinNames( out );
for( unsigned i = 0; i < out.size(); ++i ) for( unsigned i = 0; i < out.size(); ++i )
@@ -242,7 +242,7 @@ static void DefaultNoteSkinChoices( CStringArray &out )
static void DefaultNoteSkin( int &sel, bool ToSel, const ConfOption *pConfOption ) static void DefaultNoteSkin( int &sel, bool ToSel, const ConfOption *pConfOption )
{ {
CStringArray choices; vector<CString> choices;
pConfOption->MakeOptionsList( choices ); pConfOption->MakeOptionsList( choices );
if( ToSel ) if( ToSel )
@@ -670,7 +670,7 @@ void ConfOption::UpdateAvailableOptions()
} }
} }
void ConfOption::MakeOptionsList( CStringArray &out ) const void ConfOption::MakeOptionsList( vector<CString> &out ) const
{ {
out = names; out = names;
} }
+3 -3
View File
@@ -28,7 +28,7 @@ struct ConfOption
/* Return the list of available selections; Get() and Put() use indexes into this /* Return the list of available selections; Get() and Put() use indexes into this
* array. UpdateAvailableOptions() should be called before using this. */ * array. UpdateAvailableOptions() should be called before using this. */
void MakeOptionsList( CStringArray &out ) const; void MakeOptionsList( vector<CString> &out ) const;
inline int Get() const { int sel; MoveData( sel, true, this ); return sel; } inline int Get() const { int sel; MoveData( sel, true, this ); return sel; }
inline void Put( int sel ) const { MoveData( sel, false, this ); } inline void Put( int sel ) const { MoveData( sel, false, this ); }
@@ -49,7 +49,7 @@ struct ConfOption
#undef PUSH #undef PUSH
ConfOption( const char *n, MoveData_t m, ConfOption( const char *n, MoveData_t m,
void (*lst)( CStringArray &out ) ) void (*lst)( vector<CString> &out ) )
{ {
name = n; name = n;
MoveData = m; MoveData = m;
@@ -61,7 +61,7 @@ struct ConfOption
// private: // private:
vector<CString> names; vector<CString> names;
void (*MakeOptionsListCB)( CStringArray &out ); void (*MakeOptionsListCB)( vector<CString> &out );
}; };
#endif #endif
+1 -1
View File
@@ -510,7 +510,7 @@ void ScreenPackages::EnterURL( const CString & sURL )
//if we are not talking about a file, let's not worry //if we are not talking about a file, let's not worry
if( m_sEndName != "" && m_bIsPackage ) if( m_sEndName != "" && m_bIsPackage )
{ {
CStringArray AddTo; vector<CString> AddTo;
GetDirListing( "Packages/"+m_sEndName, AddTo, false, false ); GetDirListing( "Packages/"+m_sEndName, AddTo, false, false );
if ( AddTo.size() > 0 ) if ( AddTo.size() > 0 )
{ {
+1 -1
View File
@@ -46,7 +46,7 @@ private:
BitmapText m_textPackages; BitmapText m_textPackages;
BitmapText m_textWeb; BitmapText m_textWeb;
CStringArray m_Packages; vector<CString> m_Packages;
vector <CString> m_Links; vector <CString> m_Links;
vector <CString> m_LinkTitles; vector <CString> m_LinkTitles;
+1 -1
View File
@@ -95,7 +95,7 @@ void ScreenProfileOptions::ImportOptions( int iRow, const vector<PlayerNumber> &
vector<CString> vsProfiles; vector<CString> vsProfiles;
PROFILEMAN->GetLocalProfileIDs( vsProfiles ); PROFILEMAN->GetLocalProfileIDs( vsProfiles );
CStringArray::iterator iter = find( vector<CString>::iterator iter = find(
vsProfiles.begin(), vsProfiles.begin(),
vsProfiles.end(), vsProfiles.end(),
MemoryCardManager::m_sMemoryCardOsMountPoint[pn].Get() ); MemoryCardManager::m_sMemoryCardOsMountPoint[pn].Get() );
+1 -1
View File
@@ -66,7 +66,7 @@ void ScreenSMOnlineLogin::ImportOptions( int iRow, const vector<PlayerNumber> &v
FOREACH_PlayerNumber( pn ) FOREACH_PlayerNumber( pn )
{ {
CStringArray::iterator iter = find(vsProfiles.begin(), vsProfiles.end(), ProfileManager::m_sDefaultLocalProfileID[pn].Get() ); vector<CString>::iterator iter = find(vsProfiles.begin(), vsProfiles.end(), ProfileManager::m_sDefaultLocalProfileID[pn].Get() );
if( iter != vsProfiles.end() ) if( iter != vsProfiles.end() )
m_pRows[0]->SetOneSelection((PlayerNumber) pn, iter - vsProfiles.begin()); m_pRows[0]->SetOneSelection((PlayerNumber) pn, iter - vsProfiles.begin());
} }
+2 -2
View File
@@ -47,7 +47,7 @@ void ScreenSelect::Init()
// element in the list is a choice name. This level of indirection // element in the list is a choice name. This level of indirection
// makes it easier to add or remove items without having to change a bunch // makes it easier to add or remove items without having to change a bunch
// of indices. // of indices.
CStringArray asChoiceNames; vector<CString> asChoiceNames;
split( CHOICE_NAMES, ",", asChoiceNames, true ); split( CHOICE_NAMES, ",", asChoiceNames, true );
for( unsigned c=0; c<asChoiceNames.size(); c++ ) for( unsigned c=0; c<asChoiceNames.size(); c++ )
@@ -65,7 +65,7 @@ void ScreenSelect::Init()
// Load codes // Load codes
// //
{ {
CStringArray vsCodeNames; vector<CString> vsCodeNames;
split( CODE_NAMES, ",", vsCodeNames, true ); split( CODE_NAMES, ",", vsCodeNames, true );
for( unsigned c=0; c<vsCodeNames.size(); c++ ) for( unsigned c=0; c<vsCodeNames.size(); c++ )
+1 -1
View File
@@ -188,7 +188,7 @@ void ScreenSelectMode::MenuRight( PlayerNumber pn )
void ScreenSelectMode::UpdateSelectableChoices() void ScreenSelectMode::UpdateSelectableChoices()
{ {
CStringArray GraphicPaths; vector<CString> GraphicPaths;
m_iNumChoices = 0; m_iNumChoices = 0;
unsigned i=0; unsigned i=0;
unsigned j=0; unsigned j=0;
+1 -1
View File
@@ -44,7 +44,7 @@ protected:
RageSound m_soundModeChange; RageSound m_soundModeChange;
RageSound m_soundConfirm; RageSound m_soundConfirm;
RageSound m_soundStart; RageSound m_soundStart;
CStringArray arrayLocations; vector<CString> arrayLocations;
ScrollingList m_ScrollingList; ScrollingList m_ScrollingList;
Sprite m_ChoiceListFrame; Sprite m_ChoiceListFrame;
Sprite m_ChoiceListHighlight; Sprite m_ChoiceListHighlight;
+1 -1
View File
@@ -68,7 +68,7 @@ void ScreenTestInput::Update( float fDeltaTime )
{ {
Screen::Update( fDeltaTime ); Screen::Update( fDeltaTime );
CStringArray asInputs; vector<CString> asInputs;
DeviceInput di; DeviceInput di;
+1 -1
View File
@@ -195,7 +195,7 @@ ScreenWithMenuElements::~ScreenWithMenuElements()
void ScreenWithMenuElements::LoadHelpText() void ScreenWithMenuElements::LoadHelpText()
{ {
CStringArray vs; vector<CString> vs;
CString s = THEME->GetMetric(m_sName,"HelpText"); CString s = THEME->GetMetric(m_sName,"HelpText");
split( s, "\n", vs ); split( s, "\n", vs );
+1 -1
View File
@@ -145,7 +145,7 @@ void ScrollingList::StopBouncing()
Allows us to create a graphic element Allows us to create a graphic element
in the scrolling list in the scrolling list
*************************************/ *************************************/
void ScrollingList::Load( const CStringArray& asGraphicPaths ) void ScrollingList::Load( const vector<CString>& asGraphicPaths )
{ {
Unload(); Unload();
if(m_iSpriteType == SPRITE_TYPE_SPRITE) if(m_iSpriteType == SPRITE_TYPE_SPRITE)
+1 -1
View File
@@ -13,7 +13,7 @@ public:
ScrollingList(); ScrollingList();
~ScrollingList(); ~ScrollingList();
void Load( const CStringArray& asGraphicPaths ); void Load( const vector<CString>& asGraphicPaths );
void Unload(); // delete all items. Called automatically on Load() void Unload(); // delete all items. Called automatically on Load()
virtual void Update( float fDeltaTime ); virtual void Update( float fDeltaTime );
+12 -12
View File
@@ -218,7 +218,7 @@ bool Song::LoadFromSongDir( CString sDir )
m_sSongDir = sDir; m_sSongDir = sDir;
// save group name // save group name
CStringArray sDirectoryParts; vector<CString> sDirectoryParts;
split( m_sSongDir, "/", sDirectoryParts, false ); split( m_sSongDir, "/", sDirectoryParts, false );
ASSERT( sDirectoryParts.size() >= 4 ); /* e.g. "/Songs/Slow/Taps/" */ ASSERT( sDirectoryParts.size() >= 4 ); /* e.g. "/Songs/Slow/Taps/" */
m_sGroupName = sDirectoryParts[sDirectoryParts.size()-3]; // second from last item m_sGroupName = sDirectoryParts[sDirectoryParts.size()-3]; // second from last item
@@ -315,7 +315,7 @@ bool Song::LoadFromSongDir( CString sDir )
return true; // do load this song return true; // do load this song
} }
static void GetImageDirListing( CString sPath, CStringArray &AddTo, bool bReturnPathToo=false ) static void GetImageDirListing( CString sPath, vector<CString> &AddTo, bool bReturnPathToo=false )
{ {
GetDirListing( sPath + ".png", AddTo, false, bReturnPathToo ); GetDirListing( sPath + ".png", AddTo, false, bReturnPathToo );
GetDirListing( sPath + ".jpg", AddTo, false, bReturnPathToo ); GetDirListing( sPath + ".jpg", AddTo, false, bReturnPathToo );
@@ -460,7 +460,7 @@ void Song::TidyUpData()
if( !HasMusic() ) if( !HasMusic() )
{ {
CStringArray arrayPossibleMusic; vector<CString> arrayPossibleMusic;
GetDirListing( m_sSongDir + CString("*.mp3"), arrayPossibleMusic ); GetDirListing( m_sSongDir + CString("*.mp3"), arrayPossibleMusic );
GetDirListing( m_sSongDir + CString("*.ogg"), arrayPossibleMusic ); GetDirListing( m_sSongDir + CString("*.ogg"), arrayPossibleMusic );
GetDirListing( m_sSongDir + CString("*.wav"), arrayPossibleMusic ); GetDirListing( m_sSongDir + CString("*.wav"), arrayPossibleMusic );
@@ -592,7 +592,7 @@ void Song::TidyUpData()
// m_sBannerFile = ""; // m_sBannerFile = "";
// find an image with "banner" in the file name // find an image with "banner" in the file name
CStringArray arrayPossibleBanners; vector<CString> arrayPossibleBanners;
GetImageDirListing( m_sSongDir + "*banner*", arrayPossibleBanners ); GetImageDirListing( m_sSongDir + "*banner*", arrayPossibleBanners );
/* Some people do things differently for the sake of being different. Don't /* Some people do things differently for the sake of being different. Don't
@@ -608,7 +608,7 @@ void Song::TidyUpData()
// m_sBackgroundFile = ""; // m_sBackgroundFile = "";
// find an image with "bg" or "background" in the file name // find an image with "bg" or "background" in the file name
CStringArray arrayPossibleBGs; vector<CString> arrayPossibleBGs;
GetImageDirListing( m_sSongDir + "*bg*", arrayPossibleBGs ); GetImageDirListing( m_sSongDir + "*bg*", arrayPossibleBGs );
GetImageDirListing( m_sSongDir + "*background*", arrayPossibleBGs ); GetImageDirListing( m_sSongDir + "*background*", arrayPossibleBGs );
if( !arrayPossibleBGs.empty() ) if( !arrayPossibleBGs.empty() )
@@ -618,7 +618,7 @@ void Song::TidyUpData()
if( !HasCDTitle() ) if( !HasCDTitle() )
{ {
// find an image with "cdtitle" in the file name // find an image with "cdtitle" in the file name
CStringArray arrayPossibleCDTitles; vector<CString> arrayPossibleCDTitles;
GetImageDirListing( m_sSongDir + "*cdtitle*", arrayPossibleCDTitles ); GetImageDirListing( m_sSongDir + "*cdtitle*", arrayPossibleCDTitles );
if( !arrayPossibleCDTitles.empty() ) if( !arrayPossibleCDTitles.empty() )
m_sCDTitleFile = arrayPossibleCDTitles[0]; m_sCDTitleFile = arrayPossibleCDTitles[0];
@@ -627,7 +627,7 @@ void Song::TidyUpData()
if( !HasLyrics() ) if( !HasLyrics() )
{ {
// Check if there is a lyric file in here // Check if there is a lyric file in here
CStringArray arrayLyricFiles; vector<CString> arrayLyricFiles;
GetDirListing(m_sSongDir + CString("*.lrc"), arrayLyricFiles ); GetDirListing(m_sSongDir + CString("*.lrc"), arrayLyricFiles );
if( !arrayLyricFiles.empty() ) if( !arrayLyricFiles.empty() )
m_sLyricsFile = arrayLyricFiles[0]; m_sLyricsFile = arrayLyricFiles[0];
@@ -636,7 +636,7 @@ void Song::TidyUpData()
// //
// Now, For the images we still haven't found, look at the image dimensions of the remaining unclassified images. // Now, For the images we still haven't found, look at the image dimensions of the remaining unclassified images.
// //
CStringArray arrayImages; vector<CString> arrayImages;
GetImageDirListing( m_sSongDir + "*", arrayImages ); GetImageDirListing( m_sSongDir + "*", arrayImages );
for( unsigned i=0; i<arrayImages.size(); i++ ) // foreach image for( unsigned i=0; i<arrayImages.size(); i++ ) // foreach image
@@ -727,7 +727,7 @@ void Song::TidyUpData()
// they are DWI style where the movie begins at beat 0. // they are DWI style where the movie begins at beat 0.
if( !HasBGChanges() ) if( !HasBGChanges() )
{ {
CStringArray arrayPossibleMovies; vector<CString> arrayPossibleMovies;
GetDirListing( m_sSongDir + CString("*.avi"), arrayPossibleMovies ); GetDirListing( m_sSongDir + CString("*.avi"), arrayPossibleMovies );
GetDirListing( m_sSongDir + CString("*.mpg"), arrayPossibleMovies ); GetDirListing( m_sSongDir + CString("*.mpg"), arrayPossibleMovies );
GetDirListing( m_sSongDir + CString("*.mpeg"), arrayPossibleMovies ); GetDirListing( m_sSongDir + CString("*.mpeg"), arrayPossibleMovies );
@@ -766,7 +766,7 @@ void Song::TidyUpData()
* filename, and should always be the title of the song (unlike KSFs). * filename, and should always be the title of the song (unlike KSFs).
*/ */
m_sSongFileName = m_sSongDir; m_sSongFileName = m_sSongDir;
CStringArray asFileNames; vector<CString> asFileNames;
GetDirListing( m_sSongDir+"*.sm", asFileNames ); GetDirListing( m_sSongDir+"*.sm", asFileNames );
if( !asFileNames.empty() ) if( !asFileNames.empty() )
m_sSongFileName += asFileNames[0]; m_sSongFileName += asFileNames[0];
@@ -1003,7 +1003,7 @@ void Song::Save()
/* We've safely written our files and created backups. Rename non-SM and non-DWI /* We've safely written our files and created backups. Rename non-SM and non-DWI
* files to avoid confusion. */ * files to avoid confusion. */
CStringArray arrayOldFileNames; vector<CString> arrayOldFileNames;
GetDirListing( m_sSongDir + "*.bms", arrayOldFileNames ); GetDirListing( m_sSongDir + "*.bms", arrayOldFileNames );
GetDirListing( m_sSongDir + "*.ksf", arrayOldFileNames ); GetDirListing( m_sSongDir + "*.ksf", arrayOldFileNames );
@@ -1390,7 +1390,7 @@ bool Song::Matches(CString sGroup, CString sSong) const
CString sDir = this->GetSongDir(); CString sDir = this->GetSongDir();
sDir.Replace("\\","/"); sDir.Replace("\\","/");
CStringArray bits; vector<CString> bits;
split( sDir, "/", bits ); split( sDir, "/", bits );
ASSERT(bits.size() >= 2); /* should always have at least two parts */ ASSERT(bits.size() >= 2); /* should always have at least two parts */
const CString &sLastBit = bits[bits.size()-1]; const CString &sLastBit = bits[bits.size()-1];
+1 -1
View File
@@ -50,7 +50,7 @@ static void EmptyDir( CString dir )
{ {
ASSERT(dir[dir.size()-1] == '/'); ASSERT(dir[dir.size()-1] == '/');
CStringArray asCacheFileNames; vector<CString> asCacheFileNames;
GetDirListing( dir, asCacheFileNames ); GetDirListing( dir, asCacheFileNames );
for( unsigned i=0; i<asCacheFileNames.size(); i++ ) for( unsigned i=0; i<asCacheFileNames.size(); i++ )
{ {
+14 -14
View File
@@ -105,7 +105,7 @@ void SongManager::InitSongsFromDisk( LoadingWindow *ld )
void SongManager::SanityCheckGroupDir( CString sDir ) const void SongManager::SanityCheckGroupDir( CString sDir ) const
{ {
// Check to see if they put a song directly inside the group folder. // Check to see if they put a song directly inside the group folder.
CStringArray arrayFiles; vector<CString> arrayFiles;
GetDirListing( sDir + "/*.mp3", arrayFiles ); GetDirListing( sDir + "/*.mp3", arrayFiles );
GetDirListing( sDir + "/*.ogg", arrayFiles ); GetDirListing( sDir + "/*.ogg", arrayFiles );
GetDirListing( sDir + "/*.wav", arrayFiles ); GetDirListing( sDir + "/*.wav", arrayFiles );
@@ -130,7 +130,7 @@ void SongManager::AddGroup( CString sDir, CString sGroupDirName )
return; /* the group is already added */ return; /* the group is already added */
// Look for a group banner in this group folder // Look for a group banner in this group folder
CStringArray arrayGroupBanners; vector<CString> arrayGroupBanners;
GetDirListing( sDir+sGroupDirName+"/*.png", arrayGroupBanners ); GetDirListing( sDir+sGroupDirName+"/*.png", arrayGroupBanners );
GetDirListing( sDir+sGroupDirName+"/*.jpg", arrayGroupBanners ); GetDirListing( sDir+sGroupDirName+"/*.jpg", arrayGroupBanners );
GetDirListing( sDir+sGroupDirName+"/*.gif", arrayGroupBanners ); GetDirListing( sDir+sGroupDirName+"/*.gif", arrayGroupBanners );
@@ -163,7 +163,7 @@ void SongManager::LoadStepManiaSongDir( CString sDir, LoadingWindow *ld )
sDir += "/"; sDir += "/";
// Find all group directories in "Songs" folder // Find all group directories in "Songs" folder
CStringArray arrayGroupDirs; vector<CString> arrayGroupDirs;
GetDirListing( sDir+"*", arrayGroupDirs, true ); GetDirListing( sDir+"*", arrayGroupDirs, true );
SortCStringArray( arrayGroupDirs ); SortCStringArray( arrayGroupDirs );
StripCvs( arrayGroupDirs ); StripCvs( arrayGroupDirs );
@@ -175,7 +175,7 @@ void SongManager::LoadStepManiaSongDir( CString sDir, LoadingWindow *ld )
SanityCheckGroupDir(sDir+sGroupDirName); SanityCheckGroupDir(sDir+sGroupDirName);
// Find all Song folders in this group directory // Find all Song folders in this group directory
CStringArray arraySongDirs; vector<CString> arraySongDirs;
GetDirListing( sDir+sGroupDirName + "/*", arraySongDirs, true, true ); GetDirListing( sDir+sGroupDirName + "/*", arraySongDirs, true, true );
StripCvs( arraySongDirs ); StripCvs( arraySongDirs );
SortCStringArray( arraySongDirs ); SortCStringArray( arraySongDirs );
@@ -229,7 +229,7 @@ void SongManager::LoadStepManiaSongDir( CString sDir, LoadingWindow *ld )
void SongManager::LoadGroupSymLinks(CString sDir, CString sGroupFolder) void SongManager::LoadGroupSymLinks(CString sDir, CString sGroupFolder)
{ {
// Find all symlink files in this folder // Find all symlink files in this folder
CStringArray arraySymLinks; vector<CString> arraySymLinks;
GetDirListing( sDir+sGroupFolder+"/*.include", arraySymLinks, false ); GetDirListing( sDir+sGroupFolder+"/*.include", arraySymLinks, false );
SortCStringArray( arraySymLinks ); SortCStringArray( arraySymLinks );
for( unsigned s=0; s< arraySymLinks.size(); s++ ) // for each symlink in this dir, add it in as a song. for( unsigned s=0; s< arraySymLinks.size(); s++ ) // for each symlink in this dir, add it in as a song.
@@ -319,7 +319,7 @@ CString SongManager::GetSongGroupBannerPath( CString sSongGroup )
return CString(); return CString();
} }
void SongManager::GetSongGroupNames( CStringArray &AddTo ) void SongManager::GetSongGroupNames( vector<CString> &AddTo )
{ {
AddTo.insert(AddTo.end(), m_sSongGroupNames.begin(), m_sSongGroupNames.end() ); AddTo.insert(AddTo.end(), m_sSongGroupNames.begin(), m_sSongGroupNames.end() );
} }
@@ -393,7 +393,7 @@ CString SongManager::GetCourseGroupBannerPath( const CString &sCourseGroup )
} }
} }
void SongManager::GetCourseGroupNames( CStringArray &AddTo ) void SongManager::GetCourseGroupNames( vector<CString> &AddTo )
{ {
FOREACHM_CONST( CString, CourseGroupInfo, m_mapCourseGroupToInfo, iter ) FOREACHM_CONST( CString, CourseGroupInfo, m_mapCourseGroupToInfo, iter )
AddTo.push_back( iter->first ); AddTo.push_back( iter->first );
@@ -504,7 +504,7 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
// Load courses from in Courses dir // Load courses from in Courses dir
// //
{ {
CStringArray saCourseFiles; vector<CString> saCourseFiles;
GetDirListing( COURSES_DIR+"*.crs", saCourseFiles, false, true ); GetDirListing( COURSES_DIR+"*.crs", saCourseFiles, false, true );
for( unsigned i=0; i<saCourseFiles.size(); i++ ) for( unsigned i=0; i<saCourseFiles.size(); i++ )
{ {
@@ -533,7 +533,7 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
FOREACH( CString, vsCourseGroupNames, sCourseGroup ) // for each dir in /Courses/ FOREACH( CString, vsCourseGroupNames, sCourseGroup ) // for each dir in /Courses/
{ {
// Find all CRS files in this group directory // Find all CRS files in this group directory
CStringArray vsCoursePaths; vector<CString> vsCoursePaths;
GetDirListing( COURSES_DIR + *sCourseGroup + "/*.crs", vsCoursePaths, false, true ); GetDirListing( COURSES_DIR + *sCourseGroup + "/*.crs", vsCoursePaths, false, true );
SortCStringArray( vsCoursePaths ); SortCStringArray( vsCoursePaths );
@@ -562,7 +562,7 @@ void SongManager::InitAutogenCourses()
// //
// Create group courses for Endless and Nonstop // Create group courses for Endless and Nonstop
// //
CStringArray saGroupNames; vector<CString> saGroupNames;
this->GetSongGroupNames( saGroupNames ); this->GetSongGroupNames( saGroupNames );
Course* pCourse; Course* pCourse;
for( unsigned g=0; g<saGroupNames.size(); g++ ) // foreach Group for( unsigned g=0; g<saGroupNames.size(); g++ ) // foreach Group
@@ -1171,7 +1171,7 @@ Course* SongManager::GetCourseFromName( CString sName )
Song *SongManager::FindSong( CString sPath ) Song *SongManager::FindSong( CString sPath )
{ {
sPath.Replace( '\\', '/' ); sPath.Replace( '\\', '/' );
CStringArray bits; vector<CString> bits;
split( sPath, "/", bits ); split( sPath, "/", bits );
if( bits.size() == 1 ) if( bits.size() == 1 )
@@ -1270,7 +1270,7 @@ void SongManager::UpdateRankingCourses()
{ {
/* Updating the ranking courses data is fairly expensive /* Updating the ranking courses data is fairly expensive
* since it involves comparing strings. Do so sparingly. */ * since it involves comparing strings. Do so sparingly. */
CStringArray RankingCourses; vector<CString> RankingCourses;
split( THEME->GetMetric("ScreenRanking","CoursesToShow"),",", RankingCourses); split( THEME->GetMetric("ScreenRanking","CoursesToShow"),",", RankingCourses);
for( unsigned i=0; i < m_pCourses.size(); i++ ) for( unsigned i=0; i < m_pCourses.size(); i++ )
@@ -1309,7 +1309,7 @@ void SongManager::LoadAllFromProfileDir( const CString &sProfileDir, ProfileSlot
// //
CString sDir = sProfileDir + EDIT_STEPS_SUBDIR; CString sDir = sProfileDir + EDIT_STEPS_SUBDIR;
CStringArray vsFiles; vector<CString> vsFiles;
GetDirListing( sDir+"*.edit", vsFiles, false, true ); GetDirListing( sDir+"*.edit", vsFiles, false, true );
int iNumEditsLoaded = GetNumEditsLoadedFromProfile( slot ); int iNumEditsLoaded = GetNumEditsLoadedFromProfile( slot );
@@ -1329,7 +1329,7 @@ void SongManager::LoadAllFromProfileDir( const CString &sProfileDir, ProfileSlot
// //
CString sDir = sProfileDir + EDIT_COURSES_SUBDIR; CString sDir = sProfileDir + EDIT_COURSES_SUBDIR;
CStringArray vsFiles; vector<CString> vsFiles;
GetDirListing( sDir+"*.crs", vsFiles, false, true ); GetDirListing( sDir+"*.crs", vsFiles, false, true );
int iNumEditsLoaded = GetNumEditsLoadedFromProfile( slot ); int iNumEditsLoaded = GetNumEditsLoadedFromProfile( slot );
+4 -4
View File
@@ -57,13 +57,13 @@ public:
void PreloadSongImages(); void PreloadSongImages();
CString GetSongGroupBannerPath( CString sSongGroup ); CString GetSongGroupBannerPath( CString sSongGroup );
void GetSongGroupNames( CStringArray &AddTo ); void GetSongGroupNames( vector<CString> &AddTo );
bool DoesSongGroupExist( CString sSongGroup ); bool DoesSongGroupExist( CString sSongGroup );
RageColor GetSongGroupColor( const CString &sSongGroupName ); RageColor GetSongGroupColor( const CString &sSongGroupName );
RageColor GetSongColor( const Song* pSong ); RageColor GetSongColor( const Song* pSong );
CString GetCourseGroupBannerPath( const CString &sCourseGroup ); CString GetCourseGroupBannerPath( const CString &sCourseGroup );
void GetCourseGroupNames( CStringArray &AddTo ); void GetCourseGroupNames( vector<CString> &AddTo );
bool DoesCourseGroupExist( const CString &sCourseGroup ); bool DoesCourseGroupExist( const CString &sCourseGroup );
RageColor GetCourseGroupColor( const CString &sCourseGroupName ); RageColor GetCourseGroupColor( const CString &sCourseGroupName );
RageColor GetCourseColor( const Course* pCourse ); RageColor GetCourseColor( const Course* pCourse );
@@ -129,8 +129,8 @@ protected:
vector<Song*> m_pSongs; // all songs that can be played vector<Song*> m_pSongs; // all songs that can be played
vector<Song*> m_pBestSongs[NUM_ProfileSlot]; vector<Song*> m_pBestSongs[NUM_ProfileSlot];
vector<Song*> m_pShuffledSongs; // used by GetRandomSong vector<Song*> m_pShuffledSongs; // used by GetRandomSong
CStringArray m_sSongGroupNames; vector<CString> m_sSongGroupNames;
CStringArray m_sSongGroupBannerPaths; // each song group may have a banner associated with it vector<CString> m_sSongGroupBannerPaths; // each song group may have a banner associated with it
vector<Course*> m_pCourses; vector<Course*> m_pCourses;
vector<Course*> m_pBestCourses[NUM_ProfileSlot][NUM_CourseType]; vector<Course*> m_pBestCourses[NUM_ProfileSlot][NUM_CourseType];
+2 -2
View File
@@ -74,7 +74,7 @@ void SongOptions::FromString( CString sOptions )
{ {
// Init(); // Init();
sOptions.MakeLower(); sOptions.MakeLower();
CStringArray asBits; vector<CString> asBits;
split( sOptions, ",", asBits, true ); split( sOptions, ",", asBits, true );
for( unsigned i=0; i<asBits.size(); i++ ) for( unsigned i=0; i<asBits.size(); i++ )
@@ -100,7 +100,7 @@ void SongOptions::FromString( CString sOptions )
ASSERT( ret == 1 ); ASSERT( ret == 1 );
} }
CStringArray asParts; vector<CString> asParts;
split( sBit, " ", asParts, true ); split( sBit, " ", asParts, true );
bool on = true; bool on = true;
if( asParts.size() > 1 ) if( asParts.size() > 1 )
-3
View File
@@ -1311,9 +1311,6 @@ struct StdStringEqualsNoCaseA
#pragma warning (pop) #pragma warning (pop)
#endif #endif
#define CString CStdString
#define CStringArray vector<CString>
#endif // #ifndef STDSTRING_H #endif // #ifndef STDSTRING_H
/* /*
+3 -3
View File
@@ -722,7 +722,7 @@ RageDisplay *CreateDisplay()
VIDEO_TROUBLESHOOTING_URL "\n\n" VIDEO_TROUBLESHOOTING_URL "\n\n"
"Video Driver: "+GetVideoDriverName()+"\n\n"; "Video Driver: "+GetVideoDriverName()+"\n\n";
CStringArray asRenderers; vector<CString> asRenderers;
split( PREFSMAN->m_sVideoRenderers, ",", asRenderers, true ); split( PREFSMAN->m_sVideoRenderers, ",", asRenderers, true );
if( asRenderers.empty() ) if( asRenderers.empty() )
@@ -982,14 +982,14 @@ int main(int argc, char* argv[])
/* Set up alternative filesystem trees. */ /* Set up alternative filesystem trees. */
if( PREFSMAN->m_sAdditionalFolders.Get() != "" ) if( PREFSMAN->m_sAdditionalFolders.Get() != "" )
{ {
CStringArray dirs; vector<CString> dirs;
split( PREFSMAN->m_sAdditionalFolders, ",", dirs, true ); split( PREFSMAN->m_sAdditionalFolders, ",", dirs, true );
for( unsigned i=0; i < dirs.size(); i++) for( unsigned i=0; i < dirs.size(); i++)
FILEMAN->Mount( "dir", dirs[i], "/" ); FILEMAN->Mount( "dir", dirs[i], "/" );
} }
if( PREFSMAN->m_sAdditionalSongFolders.Get() != "" ) if( PREFSMAN->m_sAdditionalSongFolders.Get() != "" )
{ {
CStringArray dirs; vector<CString> dirs;
split( PREFSMAN->m_sAdditionalSongFolders, ",", dirs, true ); split( PREFSMAN->m_sAdditionalSongFolders, ",", dirs, true );
for( unsigned i=0; i < dirs.size(); i++) for( unsigned i=0; i < dirs.size(); i++)
FILEMAN->Mount( "dir", dirs[i], "/Songs" ); FILEMAN->Mount( "dir", dirs[i], "/Songs" );
+12 -12
View File
@@ -113,7 +113,7 @@ ThemeManager::ThemeManager()
/* We don't have any theme loaded until SwitchThemeAndLanguage is called. */ /* We don't have any theme loaded until SwitchThemeAndLanguage is called. */
m_sCurThemeName = ""; m_sCurThemeName = "";
CStringArray arrayThemeNames; vector<CString> arrayThemeNames;
GetThemeNames( arrayThemeNames ); GetThemeNames( arrayThemeNames );
} }
@@ -123,7 +123,7 @@ ThemeManager::~ThemeManager()
SAFE_DELETE( g_pIniMetrics ); SAFE_DELETE( g_pIniMetrics );
} }
void ThemeManager::GetThemeNames( CStringArray& AddTo ) void ThemeManager::GetThemeNames( vector<CString>& AddTo )
{ {
GetDirListing( THEMES_DIR + "*", AddTo, true ); GetDirListing( THEMES_DIR + "*", AddTo, true );
StripCvs( AddTo ); StripCvs( AddTo );
@@ -131,7 +131,7 @@ void ThemeManager::GetThemeNames( CStringArray& AddTo )
bool ThemeManager::DoesThemeExist( const CString &sThemeName ) bool ThemeManager::DoesThemeExist( const CString &sThemeName )
{ {
CStringArray asThemeNames; vector<CString> asThemeNames;
GetThemeNames( asThemeNames ); GetThemeNames( asThemeNames );
for( unsigned i=0; i<asThemeNames.size(); i++ ) for( unsigned i=0; i<asThemeNames.size(); i++ )
{ {
@@ -141,7 +141,7 @@ bool ThemeManager::DoesThemeExist( const CString &sThemeName )
return false; return false;
} }
void ThemeManager::GetLanguages( CStringArray& AddTo ) void ThemeManager::GetLanguages( vector<CString>& AddTo )
{ {
AddTo.clear(); AddTo.clear();
@@ -150,13 +150,13 @@ void ThemeManager::GetLanguages( CStringArray& AddTo )
// remove dupes // remove dupes
sort( AddTo.begin(), AddTo.end() ); sort( AddTo.begin(), AddTo.end() );
CStringArray::iterator it = unique( AddTo.begin(), AddTo.end() ); vector<CString>::iterator it = unique( AddTo.begin(), AddTo.end() );
AddTo.erase(it, AddTo.end()); AddTo.erase(it, AddTo.end());
} }
bool ThemeManager::DoesLanguageExist( const CString &sLanguage ) bool ThemeManager::DoesLanguageExist( const CString &sLanguage )
{ {
CStringArray asLanguages; vector<CString> asLanguages;
GetLanguages( asLanguages ); GetLanguages( asLanguages );
for( unsigned i=0; i<asLanguages.size(); i++ ) for( unsigned i=0; i<asLanguages.size(); i++ )
@@ -329,7 +329,7 @@ void ThemeManager::RunLuaScripts( const CString &sMask )
{ {
--iter; --iter;
const CString &sThemeDir = GetThemeDirFromName( iter->sThemeName ); const CString &sThemeDir = GetThemeDirFromName( iter->sThemeName );
CStringArray asElementPaths; vector<CString> asElementPaths;
GetDirListing( sThemeDir + "Scripts/" + sMask, asElementPaths, false, true ); GetDirListing( sThemeDir + "Scripts/" + sMask, asElementPaths, false, true );
for( unsigned i = 0; i < asElementPaths.size(); ++i ) for( unsigned i = 0; i < asElementPaths.size(); ++i )
{ {
@@ -401,7 +401,7 @@ try_element_again:
const CString sThemeDir = GetThemeDirFromName( sThemeName ); const CString sThemeDir = GetThemeDirFromName( sThemeName );
const CString &sCategory = ElementCategoryToString(category); const CString &sCategory = ElementCategoryToString(category);
CStringArray asElementPaths; vector<CString> asElementPaths;
// If sFileName already has an extension, we're looking for a specific file // If sFileName already has an extension, we're looking for a specific file
bool bLookingForSpecificFile = sElement.find_last_of('.') != sElement.npos; bool bLookingForSpecificFile = sElement.find_last_of('.') != sElement.npos;
@@ -412,7 +412,7 @@ try_element_again:
} }
else // look for all files starting with sFileName that have types we can use else // look for all files starting with sFileName that have types we can use
{ {
CStringArray asPaths; vector<CString> asPaths;
GetDirListing( sThemeDir + sCategory + "/" + ClassAndElementToFileName(sClassName,sElement) + "*", GetDirListing( sThemeDir + sCategory + "/" + ClassAndElementToFileName(sClassName,sElement) + "*",
asPaths, false, true ); asPaths, false, true );
@@ -844,7 +844,7 @@ apActorCommands ThemeManager::GetMetricA( const CString &sClassName, const CStri
void ThemeManager::NextTheme() void ThemeManager::NextTheme()
{ {
CStringArray as; vector<CString> as;
GetThemeNames( as ); GetThemeNames( as );
unsigned i; unsigned i;
for( i=0; i<as.size(); i++ ) for( i=0; i<as.size(); i++ )
@@ -854,10 +854,10 @@ void ThemeManager::NextTheme()
SwitchThemeAndLanguage( as[iNewIndex], m_sCurLanguage ); SwitchThemeAndLanguage( as[iNewIndex], m_sCurLanguage );
} }
void ThemeManager::GetLanguagesForTheme( const CString &sThemeName, CStringArray& asLanguagesOut ) void ThemeManager::GetLanguagesForTheme( const CString &sThemeName, vector<CString>& asLanguagesOut )
{ {
CString sLanguageDir = GetThemeDirFromName(sThemeName) + LANGUAGES_SUBDIR; CString sLanguageDir = GetThemeDirFromName(sThemeName) + LANGUAGES_SUBDIR;
CStringArray as; vector<CString> as;
GetDirListing( sLanguageDir + "*.ini", as ); GetDirListing( sLanguageDir + "*.ini", as );
// stip out metrics.ini // stip out metrics.ini
+3 -3
View File
@@ -34,9 +34,9 @@ public:
ThemeManager(); ThemeManager();
~ThemeManager(); ~ThemeManager();
void GetThemeNames( CStringArray& AddTo ); void GetThemeNames( vector<CString>& AddTo );
bool DoesThemeExist( const CString &sThemeName ); bool DoesThemeExist( const CString &sThemeName );
void GetLanguages( CStringArray& AddTo ); void GetLanguages( vector<CString>& AddTo );
bool DoesLanguageExist( const CString &sLanguage ); bool DoesLanguageExist( const CString &sLanguage );
void SwitchThemeAndLanguage( const CString &sThemeName, const CString &sLanguage ); void SwitchThemeAndLanguage( const CString &sThemeName, const CString &sLanguage );
void UpdateLuaGlobals(); void UpdateLuaGlobals();
@@ -103,7 +103,7 @@ protected:
static CString GetThemeDirFromName( const CString &sThemeName ); static CString GetThemeDirFromName( const CString &sThemeName );
CString GetElementDir( const CString &sThemeName ); CString GetElementDir( const CString &sThemeName );
static CString GetMetricsIniPath( const CString &sThemeName ); static CString GetMetricsIniPath( const CString &sThemeName );
static void GetLanguagesForTheme( const CString &sThemeName, CStringArray& asLanguagesOut ); static void GetLanguagesForTheme( const CString &sThemeName, vector<CString>& asLanguagesOut );
static CString GetLanguageIniPath( const CString &sThemeName, const CString &sLanguage ); static CString GetLanguageIniPath( const CString &sThemeName, const CString &sLanguage );
CString GetDefaultLanguage(); CString GetDefaultLanguage();
+1 -1
View File
@@ -295,7 +295,7 @@ void UnlockManager::Load()
{ {
LOG->Trace( "UnlockManager::Load()" ); LOG->Trace( "UnlockManager::Load()" );
CStringArray asUnlockNames; vector<CString> asUnlockNames;
split( UNLOCK_NAMES, ",", asUnlockNames ); split( UNLOCK_NAMES, ",", asUnlockNames );
if( asUnlockNames.empty() ) if( asUnlockNames.empty() )
return; return;
@@ -415,7 +415,7 @@ void ArchHooks_Win32::MountInitialFilesystems( const CString &sDirOfExecutable )
{ {
/* All Windows data goes in the directory one level above the executable. */ /* All Windows data goes in the directory one level above the executable. */
CHECKPOINT_M( ssprintf( "DOE \"%s\"", sDirOfExecutable.c_str()) ); CHECKPOINT_M( ssprintf( "DOE \"%s\"", sDirOfExecutable.c_str()) );
CStringArray parts; vector<CString> parts;
split( sDirOfExecutable, "/", parts ); split( sDirOfExecutable, "/", parts );
CHECKPOINT_M( ssprintf( "... %i parts", parts.size()) ); CHECKPOINT_M( ssprintf( "... %i parts", parts.size()) );
ASSERT_M( parts.size() > 1, ssprintf("Strange sDirOfExecutable: %s", sDirOfExecutable.c_str()) ); ASSERT_M( parts.size() > 1, ssprintf("Strange sDirOfExecutable: %s", sDirOfExecutable.c_str()) );
@@ -293,7 +293,7 @@ void ArchHooks_darwin::MountInitialFilesystems( const CString &sDirOfExecutable
{ {
#if defined(MACOSX) #if defined(MACOSX)
CHECKPOINT_M( ssprintf("DOE \"%s\"", sDirOfExecutable.c_str()) ); CHECKPOINT_M( ssprintf("DOE \"%s\"", sDirOfExecutable.c_str()) );
CStringArray parts; vector<CString> parts;
split( sDirOfExecutable, "/", parts ); split( sDirOfExecutable, "/", parts );
ASSERT( parts.size() > 3 ); ASSERT( parts.size() > 3 );
CString Dir = '/' + join( "/", parts.begin(), parts.end()-3 ); CString Dir = '/' + join( "/", parts.begin(), parts.end()-3 );
+1 -1
View File
@@ -11,7 +11,7 @@
DialogDriver *MakeDialogDriver() DialogDriver *MakeDialogDriver()
{ {
CString sDrivers = "win32,cocoa,null"; CString sDrivers = "win32,cocoa,null";
CStringArray asDriversToTry; vector<CString> asDriversToTry;
split( sDrivers, ",", asDriversToTry, true ); split( sDrivers, ",", asDriversToTry, true );
ASSERT( asDriversToTry.size() != 0 ); ASSERT( asDriversToTry.size() != 0 );
@@ -136,7 +136,7 @@ void LoadingWindow_Win32::Paint()
void LoadingWindow_Win32::SetText( CString sText ) void LoadingWindow_Win32::SetText( CString sText )
{ {
CStringArray asMessageLines; vector<CString> asMessageLines;
split( sText, "\n", asMessageLines, false ); split( sText, "\n", asMessageLines, false );
while( asMessageLines.size() < 3 ) while( asMessageLines.size() < 3 )
asMessageLines.push_back( "" ); asMessageLines.push_back( "" );
+4 -4
View File
@@ -13,7 +13,7 @@
#include "InputHandler/Selector_InputHandler.h" #include "InputHandler/Selector_InputHandler.h"
void MakeInputHandlers(CString drivers, vector<InputHandler *> &Add) void MakeInputHandlers(CString drivers, vector<InputHandler *> &Add)
{ {
CStringArray DriversToTry; vector<CString> DriversToTry;
split(drivers, ",", DriversToTry, true); split(drivers, ",", DriversToTry, true);
ASSERT( DriversToTry.size() != 0 ); ASSERT( DriversToTry.size() != 0 );
@@ -100,7 +100,7 @@ LoadingWindow *MakeLoadingWindow()
/* Don't load NULL by default. On most systems, if we can't load the SDL /* Don't load NULL by default. On most systems, if we can't load the SDL
* loading window, we won't be able to init OpenGL, either, so don't bother. */ * loading window, we won't be able to init OpenGL, either, so don't bother. */
CString drivers = "xbox,win32,cocoa,gtk"; CString drivers = "xbox,win32,cocoa,gtk";
CStringArray DriversToTry; vector<CString> DriversToTry;
split(drivers, ",", DriversToTry, true); split(drivers, ",", DriversToTry, true);
ASSERT( DriversToTry.size() != 0 ); ASSERT( DriversToTry.size() != 0 );
@@ -180,7 +180,7 @@ RageMovieTexture *MakeRageMovieTexture(RageTextureID ID)
{ {
DumpAVIDebugInfo( ID.filename ); DumpAVIDebugInfo( ID.filename );
CStringArray DriversToTry; vector<CString> DriversToTry;
split(PREFSMAN->GetMovieDrivers(), ",", DriversToTry, true); split(PREFSMAN->GetMovieDrivers(), ",", DriversToTry, true);
ASSERT(DriversToTry.size() != 0); ASSERT(DriversToTry.size() != 0);
@@ -227,7 +227,7 @@ RageMovieTexture *MakeRageMovieTexture(RageTextureID ID)
#include "Sound/Selector_RageSoundDriver.h" #include "Sound/Selector_RageSoundDriver.h"
RageSoundDriver *MakeRageSoundDriver(CString drivers) RageSoundDriver *MakeRageSoundDriver(CString drivers)
{ {
CStringArray DriversToTry; vector<CString> DriversToTry;
split(drivers, ",", DriversToTry, true); split(drivers, ",", DriversToTry, true);
ASSERT( DriversToTry.size() != 0 ); ASSERT( DriversToTry.size() != 0 );
@@ -397,7 +397,7 @@ void BacktraceNames::FromAddr( const void *p )
fprintf(stderr, "FromAddr read() failed: %s\n", strerror(errno)); fprintf(stderr, "FromAddr read() failed: %s\n", strerror(errno));
return; return;
} }
CStringArray mangledAndFile; vector<CString> mangledAndFile;
split(f, " ", mangledAndFile, true); split(f, " ", mangledAndFile, true);
if (mangledAndFile.size() == 0) if (mangledAndFile.size() == 0)
@@ -232,7 +232,7 @@ static void child_process()
if( !child_read(3, temp, size) ) if( !child_read(3, temp, size) )
return; return;
CStringArray Checkpoints; vector<CString> Checkpoints;
split(temp, "$$", Checkpoints); split(temp, "$$", Checkpoints);
delete [] temp; delete [] temp;
@@ -78,7 +78,7 @@ bool RegistryAccess::GetRegValue( const CString &sKey, const CString &sName, CSt
return true; return true;
} }
bool RegistryAccess::GetRegValue( const CString &sKey, CString sName, int &iVal ) bool RegistryAccess::GetRegValue( const CString &sKey, const CString &sName, int &iVal )
{ {
HKEY hKey = OpenRegKey( sKey ); HKEY hKey = OpenRegKey( sKey );
if( hKey == NULL ) if( hKey == NULL )
+2
View File
@@ -135,6 +135,8 @@ void ShowWarning( const char *file, int line, const char *message ); // don't pu
/* Use CStdString: */ /* Use CStdString: */
#include "StdString.h" #include "StdString.h"
using namespace StdString; using namespace StdString;
//#define CString CStdString
typedef StdString::CStdString CString;
/* Include this here to make sure our assertion handler is always /* Include this here to make sure our assertion handler is always
* used. (This file is a dependency of most everything anyway, * used. (This file is a dependency of most everything anyway,