fix signed-compare warnings
The m_iSelection array could probably be made unsigned... IF we were confident we never try to assign it a negative number, of which fact I'm not convinced.
This commit is contained in:
+1
-1
@@ -398,7 +398,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
|||||||
StepsType orgSel = StepsType_Invalid;
|
StepsType orgSel = StepsType_Invalid;
|
||||||
if( !m_StepsTypes.empty() ) // Not first run
|
if( !m_StepsTypes.empty() ) // Not first run
|
||||||
{
|
{
|
||||||
ASSERT( m_StepsTypes.size() > m_iSelection[ROW_STEPS_TYPE] );
|
ASSERT( (int) m_StepsTypes.size() > m_iSelection[ROW_STEPS_TYPE] );
|
||||||
StepsType orgSel = m_StepsTypes[m_iSelection[ROW_STEPS_TYPE]];
|
StepsType orgSel = m_StepsTypes[m_iSelection[ROW_STEPS_TYPE]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2946,7 +2946,7 @@ void GameManager::GetStepsTypesForGame( const Game *pGame, vector<StepsType>& aS
|
|||||||
// Some Styles use the same StepsType (e.g. single and versus) so check
|
// Some Styles use the same StepsType (e.g. single and versus) so check
|
||||||
// that we aren't doubling up.
|
// that we aren't doubling up.
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for( int j=0; j < aStepsTypeAddTo.size(); j++ )
|
for( unsigned j=0; j < aStepsTypeAddTo.size(); j++ )
|
||||||
if( (int) st == (int) aStepsTypeAddTo[j] ) { found = true; break; }
|
if( (int) st == (int) aStepsTypeAddTo[j] ) { found = true; break; }
|
||||||
if(found) continue;
|
if(found) continue;
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ void RageSoundMixBuffer::read( float *pBuf )
|
|||||||
|
|
||||||
void RageSoundMixBuffer::read_deinterlace( float **pBufs, int channels )
|
void RageSoundMixBuffer::read_deinterlace( float **pBufs, int channels )
|
||||||
{
|
{
|
||||||
for( int i = 0; i < m_iBufUsed / channels; ++i )
|
for( unsigned i = 0; i < m_iBufUsed / channels; ++i )
|
||||||
for( int ch = 0; ch < channels; ++ch )
|
for( int ch = 0; ch < channels; ++ch )
|
||||||
pBufs[ch][i] = m_pMixbuf[channels * i + ch];
|
pBufs[ch][i] = m_pMixbuf[channels * i + ch];
|
||||||
m_iBufUsed = 0;
|
m_iBufUsed = 0;
|
||||||
|
|||||||
+4
-4
@@ -1735,7 +1735,7 @@ void SongManager::LoadStepEditsFromProfileDir( const RString &sProfileDir, Profi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( vsFiles.size() > MAX_EDIT_STEPS_PER_PROFILE - iNumEditsLoaded )
|
if( (int) vsFiles.size() > MAX_EDIT_STEPS_PER_PROFILE - iNumEditsLoaded )
|
||||||
{
|
{
|
||||||
LOG->Warn("Profile %s has too many edits; some have been skipped.", ProfileSlotToString( slot ).c_str() );
|
LOG->Warn("Profile %s has too many edits; some have been skipped.", ProfileSlotToString( slot ).c_str() );
|
||||||
return;
|
return;
|
||||||
@@ -1749,13 +1749,13 @@ void SongManager::LoadStepEditsFromProfileDir( const RString &sProfileDir, Profi
|
|||||||
GetDirListing( sDir+"*", vsGroups, true, false );
|
GetDirListing( sDir+"*", vsGroups, true, false );
|
||||||
|
|
||||||
// XXX: Same as above, edits may be skipped in error in some cases
|
// XXX: Same as above, edits may be skipped in error in some cases
|
||||||
for( int i=0; i<vsGroups.size(); i++ )
|
for( unsigned i=0; i<vsGroups.size(); i++ )
|
||||||
{
|
{
|
||||||
RString sGroupDir = vsGroups[i]+"/";
|
RString sGroupDir = vsGroups[i]+"/";
|
||||||
vector<RString> vsSongs;
|
vector<RString> vsSongs;
|
||||||
GetDirListing(sDir+sGroupDir+"*", vsSongs, true, false );
|
GetDirListing(sDir+sGroupDir+"*", vsSongs, true, false );
|
||||||
|
|
||||||
for( int j=0; j<vsSongs.size(); j++ )
|
for( unsigned j=0; j<vsSongs.size(); j++ )
|
||||||
{
|
{
|
||||||
vector<RString> vsEdits;
|
vector<RString> vsEdits;
|
||||||
RString sSongDir = sGroupDir+vsSongs[j]+"/";
|
RString sSongDir = sGroupDir+vsSongs[j]+"/";
|
||||||
@@ -1777,7 +1777,7 @@ void SongManager::LoadStepEditsFromProfileDir( const RString &sProfileDir, Profi
|
|||||||
loaderSM.LoadEditFromFile( fn, slot, true, given );
|
loaderSM.LoadEditFromFile( fn, slot, true, given );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( vsEdits.size() > MAX_EDIT_STEPS_PER_PROFILE - iNumEditsLoaded )
|
if( (int) vsEdits.size() > MAX_EDIT_STEPS_PER_PROFILE - iNumEditsLoaded )
|
||||||
{
|
{
|
||||||
LOG->Warn("Profile %s has too many edits; some have been skipped.", ProfileSlotToString( slot ).c_str() );
|
LOG->Warn("Profile %s has too many edits; some have been skipped.", ProfileSlotToString( slot ).c_str() );
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user