Remove unused variables, unreachable returns.

This commit is contained in:
Glenn Maynard
2002-09-07 10:31:07 +00:00
parent b95f7be48c
commit 810b5f6e29
4 changed files with 3 additions and 18 deletions
-2
View File
@@ -70,8 +70,6 @@ void CroppedSprite::CropToSize( float fWidth, float fHeight )
(int)m_fCropWidth,
(int)m_fCropHeight )
);
float fFinalZoom = this->GetZoom();
// find which dimension is larger
bool bXDimNeedsToBeCropped = GetZoomedWidth() > m_fCropWidth+0.01;
+2 -3
View File
@@ -218,7 +218,6 @@ void NoteData::RemoveHoldNote( int iHoldIndex )
HoldNote& hn = m_HoldNotes[iHoldIndex];
int iHoldStartIndex = BeatToNoteRow(hn.m_fStartBeat);
int iHoldEndIndex = BeatToNoteRow(hn.m_fEndBeat);
// delete a tap note at the start of this hold
m_TapNotes[hn.m_iTrack][iHoldStartIndex] = '0';
@@ -730,7 +729,7 @@ void NoteData::SnapToNearestNoteType( NoteType nt1, NoteType nt2, float fBeginBe
case NOTE_TYPE_8TH: fSnapInterval1 = 1/2.0f; break;
case NOTE_TYPE_12TH: fSnapInterval1 = 1/3.0f; break;
case NOTE_TYPE_16TH: fSnapInterval1 = 1/4.0f; break;
default: ASSERT( false );
default: ASSERT( false ); return;
}
switch( nt2 )
@@ -740,7 +739,7 @@ void NoteData::SnapToNearestNoteType( NoteType nt1, NoteType nt2, float fBeginBe
case NOTE_TYPE_12TH: fSnapInterval2 = 1/3.0f; break;
case NOTE_TYPE_16TH: fSnapInterval2 = 1/4.0f; break;
case -1: fSnapInterval2 = 10000; break; // nothing will ever snap to this. That's what we want!
default: ASSERT( false );
default: ASSERT( false ); return;
}
int iNoteIndexBegin = BeatToNoteRow( fBeginBeat );
-9
View File
@@ -70,10 +70,7 @@ bool BMSLoader::LoadFromBMSFile( const CString &sPath, Notes &out, Notes &out2 )
CStdioFile file;
if( !file.Open( sPath, CFile::modeRead|CFile::shareDenyNone ) )
{
throw RageException( "Failed to open %s.", sPath );
return false;
}
CString line;
while( file.ReadString(line) ) // foreach line
@@ -308,10 +305,7 @@ bool BMSLoader::LoadFromBMSDir( CString sDir, Song &out )
CStdioFile file;
if( !file.Open( sPath, CFile::modeRead|CFile::shareDenyNone ) )
{
throw RageException( "Failed to open %s.", sPath );
return false;
}
CString line;
while( file.ReadString(line) ) // foreach line
@@ -448,10 +442,7 @@ bool BMSLoader::LoadFromBMSDir( CString sDir, Song &out )
// open the song file again and and look for this tag's value
CStdioFile file;
if( !file.Open( sPath, CFile::modeRead|CFile::shareDenyNone ) )
{
throw RageException( "Failed to open %s.", sPath );
return false;
}
CString line;
while( file.ReadString(line) ) // foreach line
+1 -4
View File
@@ -191,8 +191,6 @@ void Player::Update( float fDeltaTime )
// Check for TapNote misses
//
int iNumMisses = UpdateTapNotesMissedOlderThan( GAMESTATE->m_fSongBeat - GetMaxBeatDifference() );
if( iNumMisses > 0 )
int kjsdfsd = 0;
//
// update HoldNotes logic
@@ -203,7 +201,6 @@ void Player::Update( float fDeltaTime )
HoldNoteScore &hns = m_HoldNoteScores[i];
float &fLife = m_fHoldNoteLife[i];
int iHoldStartIndex = BeatToNoteRow(hn.m_fStartBeat);
int iHoldEndIndex = BeatToNoteRow(hn.m_fEndBeat);
m_NoteField.m_bIsHoldingHoldNote[i] = false; // set host flag so NoteField can do intelligent drawing
@@ -463,7 +460,7 @@ void Player::OnRowDestroyed( int col, int iIndexThatWasSteppedOn )
m_Judgement.SetJudgement( score );
// zoom the judgement and combo like a heart beat
float fStartZoomX, fStartZoomY;
float fStartZoomX=0.f, fStartZoomY=0.f;
switch( score )
{
case TNS_PERFECT: fStartZoomX = g_fJudgePerfectZoomX; fStartZoomY = g_fJudgePerfectZoomY; break;