return "" -> return NULL

This commit is contained in:
Chris Danford
2005-09-02 00:14:07 +00:00
parent 7c4f2595ab
commit e439ae2a96
41 changed files with 97 additions and 87 deletions
+2 -2
View File
@@ -84,7 +84,7 @@ static const char *aliases[][2] = {
CString AnnouncerManager::GetPathTo( CString sAnnouncerName, CString sFolderName )
{
if(sAnnouncerName == "")
return ""; /* announcer disabled */
return NULL; /* announcer disabled */
const CString AnnouncerPath = GetAnnouncerDirFromName(sAnnouncerName);
@@ -112,7 +112,7 @@ CString AnnouncerManager::GetPathTo( CString sAnnouncerName, CString sFolderName
temp.Open( AnnouncerPath+sFolderName + "/announcer files go here.txt", RageFile::WRITE );
#endif
return "";
return NULL;
}
CString AnnouncerManager::GetPathTo( CString sFolderName )
+5 -5
View File
@@ -66,7 +66,7 @@ CString GetRandomFileInDir( CString sDir )
CStringArray asFiles;
GetDirListing( sDir, asFiles, false, true );
if( asFiles.empty() )
return "";
return NULL;
else
return asFiles[rand()%asFiles.size()];
}
@@ -78,7 +78,7 @@ CString Character::GetModelPath() const
if( DoesFileExist(s) )
return s;
else
return "";
return NULL;
}
CString Character::GetRestAnimationPath() const { return DerefRedir(GetRandomFileInDir(m_sCharDir + "Rest/")); }
@@ -92,7 +92,7 @@ CString Character::GetTakingABreakPath() const
GetDirListing( m_sCharDir+"break.gif", as, false, true );
GetDirListing( m_sCharDir+"break.bmp", as, false, true );
if( as.empty() )
return "";
return NULL;
else
return as[0];
}
@@ -115,7 +115,7 @@ CString Character::GetSongSelectIconPath() const
GetDirListing( m_sCharDir+"icon.gif", as, false, true );
GetDirListing( m_sCharDir+"icon.bmp", as, false, true );
if( as.empty() )
return "";
return NULL;
else
return as[0];
}
@@ -141,7 +141,7 @@ CString Character::GetStageIconPath() const
GetDirListing( m_sCharDir+"card.gif", as, false, true );
GetDirListing( m_sCharDir+"card.bmp", as, false, true );
if( as.empty() )
return "";
return NULL;
else
return as[0];
}
+1 -1
View File
@@ -17,7 +17,7 @@ void IncorrectNumberArgsWarning( const Command &command, int iMaxIndexAccessed )
CString Command::GetName() const
{
if( m_vsArgs.empty() )
return "";
return NULL;
CString s = m_vsArgs[0];
s.MakeLower();
return s;
+1 -1
View File
@@ -278,7 +278,7 @@ CString CourseID::ToString() const
return sPath;
if( !sFullTitle.empty() )
return sFullTitle;
return "";
return NULL;
}
bool CourseID::IsValid() const
+1 -1
View File
@@ -244,7 +244,7 @@ CString CryptManager::GetMD5( CString fn )
if( !file.Open( fn, RageFile::READ ) )
{
LOG->Warn( "GetMD5: Failed to open file '%s'", fn.c_str() );
return "";
return NULL;
}
MD5Init(&md5c);
+1 -1
View File
@@ -197,7 +197,7 @@ static const CString MONTH_TO_NAME[MONTHS_IN_YEAR] =
CString MonthToString( int iMonthIndex )
{
if( iMonthIndex < 0 || iMonthIndex >= (int) sizeof(MONTH_TO_NAME) )
return "";
return NULL;
return MONTH_TO_NAME[iMonthIndex];
}
LuaFunction( MonthToString, MonthToString( IArg(1) ) );
+2 -2
View File
@@ -695,7 +695,7 @@ CString FontPageSettings::MapRange( CString sMapping, int iMapOffset, int iGlyph
iCount--;
}
return "";
return NULL;
}
const wchar_t *pMapping = FontCharmaps::get_char_map( sMapping );
@@ -726,7 +726,7 @@ CString FontPageSettings::MapRange( CString sMapping, int iMapOffset, int iGlyph
if( iCount )
return "Map overflow"; /* there aren't enough characters in the map */
return "";
return NULL;
}
static CStringArray LoadStack;
+3 -3
View File
@@ -2764,7 +2764,7 @@ CString GameManager::GetMenuButtonSecondaryFunction( const Game *pGame, GameButt
* it) and/or map to a menu button (if m_DedicatedMenuButton or m_SecondaryMenuButton
* map to it).
*
* If a button is only used in gameplay or is only used in menus, return ""; the
* If a button is only used in gameplay or is only used in menus, return NULL; the
* primary description is sufficient.
*
* If a button is used in both gameplay and menus, return szSecondaryNames[] for
@@ -2800,12 +2800,12 @@ CString GameManager::GetMenuButtonSecondaryFunction( const Game *pGame, GameButt
FOREACH_MenuButton(m)
{
if( !bUsedInGameplay && pGame->m_DedicatedMenuButton[m] == gb )
return "";
return NULL;
else if( bUsedInGameplay && pGame->m_SecondaryMenuButton[m] == gb )
return szSecondaryNames[m];
}
return ""; // only used in gameplay
return NULL; // only used in gameplay
}
+2 -2
View File
@@ -160,8 +160,8 @@ void MsdFile::ReadFromString( const CString &sString )
CString MsdFile::GetParam(unsigned val, unsigned par) const
{
if(val >= GetNumValues()) return "";
if(par >= GetNumParams(val)) return "";
if(val >= GetNumValues()) return NULL;
if(par >= GetNumParams(val)) return NULL;
return values[val].params[par];
}
+1 -1
View File
@@ -11,7 +11,7 @@ public:
{
vector<CString> params;
CString operator[](unsigned i) const { if(i >= params.size()) return ""; return params[i]; }
CString operator[](unsigned i) const { if(i >= params.size()) return NULL; return params[i]; }
};
virtual ~MsdFile() { }
+2 -2
View File
@@ -13,7 +13,7 @@ NetworkSyncManager::~NetworkSyncManager () { }
void NetworkSyncManager::CloseConnection() { }
void NetworkSyncManager::PostStartUp(const CString& ServerIP ) { }
bool NetworkSyncManager::Connect(const CString& addy, unsigned short port) { return false; }
CString NetworkSyncManager::GetServerName() { return ""; }
CString NetworkSyncManager::GetServerName() { return NULL; }
void NetworkSyncManager::ReportNSSOnOff(int i) { }
void NetworkSyncManager::ReportTiming(float offset, int PlayerNumber) { }
void NetworkSyncManager::ReportScore(int playerID, int step, int score, int combo) { }
@@ -25,7 +25,7 @@ void NetworkSyncManager::Update( float fDeltaTime ) { }
bool NetworkSyncManager::ChangedScoreboard(int Column) { return false; }
void NetworkSyncManager::SendChat(const CString& message) { }
void NetworkSyncManager::SelectUserSong() { }
CString NetworkSyncManager::MD5Hex( const CString &sInput ) { return ""; }
CString NetworkSyncManager::MD5Hex( const CString &sInput ) { return NULL; }
int NetworkSyncManager::GetSMOnlineSalt() { return 0; }
#else
#include "ezsockets.h"
+1 -1
View File
@@ -273,7 +273,7 @@ CString NoteSkinManager::GetPathFromDirAndFile( const CString &sDir, const CStri
GetDirListing( sDir+sFileName+"*", matches, false, true );
if( matches.empty() )
return "";
return NULL;
if( matches.size() > 1 )
{
+1 -1
View File
@@ -186,7 +186,7 @@ CString Profile::GetDisplayNameOrHighScoreName() const
else if( !m_sLastUsedHighScoreName.empty() )
return m_sLastUsedHighScoreName;
else
return "";
return NULL;
}
Character *Profile::GetCharacter() const
+1 -1
View File
@@ -538,7 +538,7 @@ CString ProfileManager::GetProfileDirImportedFrom( ProfileSlot slot ) const
case PROFILE_SLOT_PLAYER_2:
return m_sProfileDirImportedFrom[slot];
case PROFILE_SLOT_MACHINE:
return "";
return NULL;
default:
ASSERT(0);
}
+4 -4
View File
@@ -54,20 +54,20 @@ CString RageDisplay::SetVideoMode( VideoModeParams p, bool &bNeedReloadTextures
CString err;
err = this->TryVideoMode(p,bNeedReloadTextures);
if( err == "" )
return "";
return NULL;
LOG->Trace( "TryVideoMode failed: %s", err.c_str() );
// fall back
p.windowed = false;
if( this->TryVideoMode(p,bNeedReloadTextures) == "" )
return "";
return NULL;
p.bpp = 16;
if( this->TryVideoMode(p,bNeedReloadTextures) == "" )
return "";
return NULL;
p.width = 640;
p.height = 480;
if( this->TryVideoMode(p,bNeedReloadTextures) == "" )
return "";
return NULL;
return ssprintf( "SetVideoMode failed: %s", err.c_str() );
}
+2 -2
View File
@@ -222,7 +222,7 @@ public:
};
bool SaveScreenshot( CString sPath, GraphicsFileFormat format );
virtual CString GetTextureDiagnostics( unsigned id ) const { return ""; }
virtual CString GetTextureDiagnostics( unsigned id ) const { return NULL; }
virtual RageSurface* CreateScreenshot() = 0; // allocates a surface. Caller must delete it.
protected:
@@ -235,7 +235,7 @@ protected:
virtual void DrawLineStripInternal( const RageSpriteVertex v[], int iNumVerts, float LineWidth );
virtual void DrawCircleInternal( const RageSpriteVertex &v, float radius );
// Return "" if mode change was successful, an error message otherwise.
// return NULL if mode change was successful, an error message otherwise.
// bNewDeviceOut is set true if a new device was created and textures
// need to be reloaded.
virtual CString TryVideoMode( VideoModeParams params, bool &bNewDeviceOut ) = 0;
+2 -2
View File
@@ -392,7 +392,7 @@ CString SetD3DParams( bool &bNewDeviceOut )
}
}
return "";
return NULL;
}
/* If the given parameters have failed, try to lower them. */
@@ -605,7 +605,7 @@ CString RageDisplay_D3D::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
/* Palettes were lost by Reset(), so mark them unloaded. */
g_TexResourceToPaletteIndex.clear();
return ""; // mode change successful
return NULL; // mode change successful
}
void RageDisplay_D3D::ResolutionChanged()
+1 -1
View File
@@ -74,7 +74,7 @@ protected:
void DrawLineStripInternal( const RageSpriteVertex v[], int iNumVerts, float LineWidth ) { }
VideoModeParams m_Params;
CString TryVideoMode( VideoModeParams params, bool &bNewDeviceOut ) { m_Params = params; return ""; }
CString TryVideoMode( VideoModeParams params, bool &bNewDeviceOut ) { m_Params = params; return NULL; }
RageSurface* CreateScreenshot();
void SetViewport(int shift_left, int shift_down) { }
RageMatrix GetOrthoMatrix( float l, float r, float b, float t, float zn, float zf );
+4 -4
View File
@@ -334,7 +334,7 @@ CString GetInfoLog( GLhandleARB h )
GLint iLength;
GLExt.glGetObjectParameterivARB( h, GL_OBJECT_INFO_LOG_LENGTH_ARB, &iLength );
if( !iLength )
return "";
return NULL;
GLcharARB *pInfoLog = new GLcharARB[iLength];
GLExt.glGetInfoLogARB( h, iLength, &iLength, pInfoLog );
@@ -477,7 +477,7 @@ CString RageDisplay_OGL::Init( VideoModeParams p, bool bAllowUnacceleratedRender
InitScalingScript();
return "";
return NULL;
}
#if defined(UNIX) && defined(HAVE_LIBXTST)
@@ -698,7 +698,7 @@ CString RageDisplay_OGL::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut )
ResolutionChanged();
return ""; // successfully set mode
return NULL; // successfully set mode
}
void RageDisplay_OGL::SetViewport(int shift_left, int shift_down)
@@ -1884,7 +1884,7 @@ void RageDisplay_OGL::SetLineWidth( float fWidth )
CString RageDisplay_OGL::GetTextureDiagnostics( unsigned id ) const
{
return "";
return NULL;
}
void RageDisplay_OGL::SetAlphaTest( bool b )
+2 -2
View File
@@ -33,7 +33,7 @@ RageFileBasic *RageFile::Copy() const
CString RageFile::GetPath() const
{
if ( !IsOpen() )
return "";
return NULL;
CString sRet = m_File->GetDisplayPath();
if( sRet != "" )
@@ -219,7 +219,7 @@ void FileReading::ReadBytes( RageFileBasic &f, void *buf, int size, CString &sEr
CString FileReading::ReadString( RageFileBasic &f, int size, CString &sError )
{
if( sError.size() != 0 )
return "";
return NULL;
CString sBuf;
int ret = f.Read( sBuf, size );
+2 -2
View File
@@ -42,7 +42,7 @@ public:
virtual int Flush() = 0;
/* This returns a descriptive path for the file, or "". */
virtual CString GetDisplayPath() const { return ""; }
virtual CString GetDisplayPath() const { return NULL; }
virtual RageFileBasic *Copy() const = 0;
@@ -88,7 +88,7 @@ public:
bool GetCRC32( uint32_t *iRet );
virtual int GetFileSize() const = 0;
virtual CString GetDisplayPath() const { return ""; }
virtual CString GetDisplayPath() const { return NULL; }
virtual RageFileBasic *Copy() const { FAIL_M( "Copying unimplemented" ); }
protected:
+2 -2
View File
@@ -329,11 +329,11 @@ CString LoadedDriver::GetPath( const CString &path )
if( path.size() >= 2 && path[1] == '@' )
{
if( MountPoint.size() < 2 || MountPoint[1] != '@' )
return "";
return NULL;
}
if( path.Left( MountPoint.size() ).CompareNoCase( MountPoint ) )
return ""; /* no match */
return NULL; /* no match */
/* Add one, so we don't cut off the leading slash. */
CString sRet = path.Right( path.size() - MountPoint.size() + 1 );
+3 -3
View File
@@ -270,8 +270,8 @@ CString DeviceButtonToString( InputDevice device, DeviceButton i )
case DEVICE_PUMP2: return PumpPadButtonToString( (PumpPadButton)i );
case DEVICE_MIDI: return MidiButtonToString( i );
case DEVICE_PARA1: return ParaPadButtonToString( (ParaPadButton)i );
case DEVICE_NONE: return "";
default: ASSERT(0); return "";
case DEVICE_NONE: return NULL;
default: ASSERT(0); return NULL;
}
}
@@ -337,7 +337,7 @@ int GetNumDeviceButtons( InputDevice device )
CString DeviceInput::toString() const
{
if( device == DEVICE_NONE )
return "";
return NULL;
CString s = InputDeviceToString(device) + "_" + DeviceButtonToString(device,button);
return s;
+1 -1
View File
@@ -357,7 +357,7 @@ public:
CString ReadString( RageFile &f, int iSize, CString &sError )
{
if( sError.size() != 0 )
return "";
return NULL;
CString sBuf;
char *pBuf = sBuf.GetBuffer( iSize );
+17 -8
View File
@@ -277,7 +277,7 @@ CString werr_ssprintf( int err, const char *fmt, ...)
CString ConvertWstringToACP( wstring s )
{
if( s.empty() )
return "";
return NULL;
int iBytes = WideCharToMultiByte( CP_ACP, 0, s.data(), s.size(),
NULL, 0, NULL, FALSE );
@@ -301,7 +301,7 @@ CString ConvertUTF8ToACP( CString s )
CString join( const CString &Deliminator, const CStringArray& Source)
{
if( Source.empty() )
return "";
return NULL;
CString csTmp;
@@ -317,7 +317,7 @@ CString join( const CString &Deliminator, const CStringArray& Source)
CString join( const CString &Delimitor, CStringArray::const_iterator begin, CStringArray::const_iterator end )
{
if( begin == end )
return "";
return NULL;
CString ret;
while( begin != end )
@@ -512,11 +512,11 @@ CString GetExtension( const CString &sPath )
{
size_t pos = sPath.rfind( '.' );
if( pos == sPath.npos )
return "";
return NULL;
size_t slash = sPath.find( '/', pos );
if( slash != sPath.npos )
return ""; /* rare: path/dir.ext/fn */
return NULL; /* rare: path/dir.ext/fn */
return sPath.substr( pos+1, sPath.size()-pos+1 );
}
@@ -660,6 +660,15 @@ void StripCrnl(CString &s)
s.erase(s.size()-1);
}
bool EndsWith( const CString &sTestThis, const CString &sEnding )
{
ASSERT( !sEnding.empty() );
if( sTestThis.size() < sEnding.size() )
return false;
return sTestThis.Right( sEnding.size() ) == sEnding;
}
void StripCvs( vector<CString> &vs )
{
for( unsigned i=0; i<vs.size(); i++ )
@@ -686,7 +695,7 @@ CString DerefRedir(const CString &_path)
/* Empty is invalid. */
if( sNewFileName == "" )
return "";
return NULL;
FixSlashesInPlace( sNewFileName );
@@ -1244,7 +1253,7 @@ CString Basename( const CString &dir )
{
size_t end = dir.find_last_not_of( "/\\" );
if( end == dir.npos )
return "";
return NULL;
size_t start = dir.find_last_of( "/\\", end );
if( start == dir.npos )
@@ -1286,7 +1295,7 @@ CString Dirname( const CString &dir )
CString Capitalize( const CString &s )
{
if( s.GetLength()==0 )
return "";
return NULL;
CString s2 = s;
/* XXX: utf-8 */
if( !(s2[0] & 0x80) )
+1
View File
@@ -313,6 +313,7 @@ inline T Decrement( T a ) { --a; return a; }
void TrimLeft(CString &str, const char *s = "\r\n\t ");
void TrimRight(CString &str, const char *s = "\r\n\t ");
void StripCrnl(CString &s);
bool EndsWith( const CString &sTestThis, const CString &sEnding );
void StripCvs( vector<CString> &vs ); // remove all items that end in "cvs"
+2 -2
View File
@@ -69,11 +69,11 @@ BackgroundLoader::~BackgroundLoader()
CString BackgroundLoader::GetRequest()
{
if( !g_bEnableBackgroundLoading )
return "";
return NULL;
LockMut( m_Mutex );
if( !m_CacheRequests.size() )
return "";
return NULL;
CString ret;
ret = m_CacheRequests.front();
+1 -1
View File
@@ -540,7 +540,7 @@ static CString GetOneBakedRandomFile( Song *pSong, bool bTryGenre = true )
if( !vsNamesOut.empty() )
return vsNamesOut[rand()%vsNamesOut.size()];
else
return "";
return NULL;
}
static MenuDef g_InsertTapAttack(
+4 -4
View File
@@ -43,7 +43,7 @@ CString GetStatsLineTitle( PlayerNumber pn, EndingStatsLine line )
CourseDifficulty cd = (CourseDifficulty)(DIFFICULTY_EASY+line-PERCENT_COMPLETE_EASY);
ASSERT( cd >= 0 && cd < NUM_COURSE_DIFFICULTIES );
if( !GAMESTATE->IsCourseDifficultyShown(cd) )
return "";
return NULL;
return CourseDifficultyToThemedString(cd);
}
else
@@ -53,7 +53,7 @@ CString GetStatsLineTitle( PlayerNumber pn, EndingStatsLine line )
return DifficultyToThemedString(dc);
}
}
default: ASSERT(0); return "";
default: ASSERT(0); return NULL;
}
}
@@ -107,7 +107,7 @@ CString GetStatsLineValue( PlayerNumber pn, EndingStatsLine line )
CourseDifficulty cd = (CourseDifficulty)(DIFFICULTY_EASY+line-PERCENT_COMPLETE_EASY);
ASSERT( cd >= 0 && cd < NUM_COURSE_DIFFICULTIES );
if( !GAMESTATE->IsCourseDifficultyShown(cd) )
return "";
return NULL;
CString sDifficulty = CourseDifficultyToThemedString(cd);
fPercent = pProfile->GetCoursesPercentComplete(st,cd);
}
@@ -120,7 +120,7 @@ CString GetStatsLineValue( PlayerNumber pn, EndingStatsLine line )
}
return ssprintf( "%05.2f%%", fPercent*100 );
}
default: ASSERT(0); return "";
default: ASSERT(0); return NULL;
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ CString ASMHClass::NumberToString( ScreenMessage SM )
if ( SM == iter->second )
return (*iter).first;
return "";
return NULL;
}
/*
+1 -1
View File
@@ -367,7 +367,7 @@ CString ScreenOptions::GetExplanationText( int iRow ) const
bool bAllowExplanation = row.GetRowDef().m_bAllowExplanation;
bool bShowExplanations = bAllowExplanation && SHOW_EXPLANATIONS.GetValue();
if( !bShowExplanations )
return "";
return NULL;
CString sLineName = row.GetRowDef().m_sName;
ASSERT( !sLineName.empty() );
+1 -1
View File
@@ -408,7 +408,7 @@ CString ScreenPackages::URLEncode( const CString &URL )
CString ScreenPackages::StripOutContainers( const CString & In )
{
if( In.size() == 0 )
return "";
return NULL;
unsigned i = 0;
char t = In.at(i);
+2 -2
View File
@@ -228,7 +228,7 @@ CString ScreenProfileOptions::GetSelectedProfileID()
const OptionRow &row = *m_pRows[GetCurrentRow()];
const int Selection = row.GetOneSharedSelection();
if( !Selection )
return "";
return NULL;
return vsProfiles[ Selection-1 ];
}
@@ -237,7 +237,7 @@ CString ScreenProfileOptions::GetSelectedProfileName()
const OptionRow &row = *m_pRows[GetCurrentRow()];
const int Selection = row.GetOneSharedSelection();
if( !Selection )
return "";
return NULL;
return g_ProfileOptionsLines[PO_PLAYER1].m_vsChoices[ Selection ];
}
+1 -1
View File
@@ -169,7 +169,7 @@ CString ScreenSMOnlineLogin::GetSelectedProfileID()
const OptionRow &row = *m_pRows[GetCurrentRow()];
const int Selection = row.GetOneSharedSelection();
if( !Selection )
return "";
return NULL;
return vsProfiles[ Selection-1 ];
}
+2 -2
View File
@@ -132,7 +132,7 @@ void ScreenSystemLayer::ReloadCreditsText()
CString ScreenSystemLayer::GetCreditsMessage( PlayerNumber pn ) const
{
if( (bool)CREDITS_JOIN_ONLY && !GAMESTATE->PlayersCanJoin() )
return "";
return NULL;
bool bShowCreditsMessage;
if( SCREENMAN && SCREENMAN->GetTopScreen() && SCREENMAN->GetTopScreen()->GetScreenType() == system_menu )
@@ -160,7 +160,7 @@ CString ScreenSystemLayer::GetCreditsMessage( PlayerNumber pn ) const
else if( GAMESTATE->PlayersCanJoin() )
return CREDITS_INSERT_CARD.GetValue();
else
return "";
return NULL;
case MEMORY_CARD_STATE_ERROR: return THEME->GetMetric( m_sName, "CreditsCard" + MEMCARDMAN->GetCardError(pn) );
case MEMORY_CARD_STATE_TOO_LATE: return CREDITS_CARD_TOO_LATE.GetValue();
+2 -2
View File
@@ -1245,7 +1245,7 @@ vector<BackgroundChange> &Song::GetForegroundChanges()
CString GetSongAssetPath( CString sPath, const CString &sSongPath )
{
if( sPath == "" )
return "";
return NULL;
/* If there's no path in the file, the file is in the same directory
* as the song. (This is the preferred configuration.) */
@@ -1264,7 +1264,7 @@ CString GetSongAssetPath( CString sPath, const CString &sSongPath )
/* If the path still begins with "../", then there were an unreasonable number
* of them at the beginning of the path. Ignore the path entirely. */
if( sPath.Left(3) == "../" )
return "";
return NULL;
return sPath;
}
+6 -6
View File
@@ -316,7 +316,7 @@ CString SongManager::GetSongGroupBannerPath( CString sSongGroup )
return m_sSongGroupBannerPaths[i];
}
return "";
return NULL;
}
void SongManager::GetSongGroupNames( CStringArray &AddTo )
@@ -385,7 +385,7 @@ CString SongManager::GetCourseGroupBannerPath( const CString &sCourseGroup )
if( iter == m_mapCourseGroupToInfo.end() )
{
ASSERT_M( 0, ssprintf("requested banner for course group '%s' that doesn't exist",sCourseGroup.c_str()) );
return "";
return NULL;
}
else
{
@@ -1439,7 +1439,7 @@ CString GetCurrentSongDisplayTitle()
{
const Song* pSong = GAMESTATE->m_pCurSong;
if( pSong == NULL )
return "";
return NULL;
return pSong->GetDisplayFullTitle();
}
@@ -1447,7 +1447,7 @@ CString GetCurrentSongDisplayArtist()
{
const Song* pSong = GAMESTATE->m_pCurSong;
if( pSong == NULL )
return "";
return NULL;
return pSong->GetDisplayArtist();
}
@@ -1455,7 +1455,7 @@ CString GetCurrentSongCredit()
{
const Song* pSong = GAMESTATE->m_pCurSong;
if( pSong == NULL )
return "";
return NULL;
return pSong->m_sCredit;
}
@@ -1463,7 +1463,7 @@ CString GetCurrentStepsCredits()
{
const Song* pSong = GAMESTATE->m_pCurSong;
if( pSong == NULL )
return "";
return NULL;
CString s;
+6 -6
View File
@@ -212,12 +212,12 @@ void SongUtil::SortSongPointerArrayByNumPlays( vector<Song*> &vpSongsInOut, cons
CString SongUtil::GetSectionNameFromSongAndSort( const Song* pSong, SortOrder so )
{
if( pSong == NULL )
return "";
return NULL;
switch( so )
{
case SORT_PREFERRED:
return "";
return NULL;
case SORT_GROUP:
// guaranteed not empty
return pSong->m_sGroupName;
@@ -234,7 +234,7 @@ CString SongUtil::GetSectionNameFromSongAndSort( const Song* pSong, SortOrder so
s = MakeSortString(s); // resulting string will be uppercase
if( s.empty() )
return "";
return NULL;
else if( s[0] >= '0' && s[0] <= '9' )
return "NUM";
else if( s[0] < 'A' || s[0] > 'Z')
@@ -256,7 +256,7 @@ CString SongUtil::GetSectionNameFromSongAndSort( const Song* pSong, SortOrder so
return ssprintf("%03d-%03d",iMaxBPM-(iBPMGroupSize-1), iMaxBPM);
}
case SORT_POPULARITY:
return "";
return NULL;
case SORT_TOP_GRADES:
{
int iCounts[NUM_Grade];
@@ -299,14 +299,14 @@ CString SongUtil::GetSectionNameFromSongAndSort( const Song* pSong, SortOrder so
return "N/A";
}
case SORT_MODE_MENU:
return "";
return NULL;
case SORT_ALL_COURSES:
case SORT_NONSTOP_COURSES:
case SORT_ONI_COURSES:
case SORT_ENDLESS_COURSES:
default:
ASSERT(0);
return "";
return NULL;
}
}
+1 -1
View File
@@ -721,7 +721,7 @@ void Sprite::SetSecondsIntoAnimation( float fSeconds )
CString Sprite::GetTexturePath() const
{
if( m_pTexture==NULL )
return "";
return NULL;
return m_pTexture->GetID().filename;
}
+1 -1
View File
@@ -1236,7 +1236,7 @@ CString SaveScreenshot( CString sDir, bool bSaveCompressed, bool bMakeSignature,
if( !bResult )
{
SCREENMAN->PlayInvalidSound();
return "";
return NULL;
}
SCREENMAN->PlayScreenshotSound();
+1 -1
View File
@@ -18,7 +18,7 @@ void ChangeCurrentGame( const Game* g );
void FocusChanged( bool bHasFocus );
bool AppHasFocus();
// If successful, return filename of screenshot in sDir, else return ""
// If successful, return filename of screenshot in sDir, else return NULL
CString SaveScreenshot( CString sDir, bool bSaveCompressed, bool bMakeSignature, int iIndex = -1 );
void InsertCoin( int iNum = 1, const RageTimer *pTime = NULL );