Merge branch 'warnings' of https://github.com/djpohly/stepmania into djpohly-warnings
This commit is contained in:
+2
-2
@@ -398,8 +398,8 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
||||
StepsType orgSel = StepsType_Invalid;
|
||||
if( !m_StepsTypes.empty() ) // Not first run
|
||||
{
|
||||
ASSERT( m_StepsTypes.size() > m_iSelection[ROW_STEPS_TYPE] );
|
||||
StepsType orgSel = m_StepsTypes[m_iSelection[ROW_STEPS_TYPE]];
|
||||
ASSERT( (int) m_StepsTypes.size() > m_iSelection[ROW_STEPS_TYPE] );
|
||||
orgSel = m_StepsTypes[m_iSelection[ROW_STEPS_TYPE]];
|
||||
}
|
||||
|
||||
// The StepsType selection may no longer be valid. Zero it for now.
|
||||
|
||||
+2
-2
@@ -2946,8 +2946,8 @@ void GameManager::GetStepsTypesForGame( const Game *pGame, vector<StepsType>& aS
|
||||
// Some Styles use the same StepsType (e.g. single and versus) so check
|
||||
// that we aren't doubling up.
|
||||
bool found = false;
|
||||
for( int j=0; j < aStepsTypeAddTo.size(); j++ )
|
||||
if( (int) st == (int) aStepsTypeAddTo[j] ) { found = true; break; }
|
||||
for( unsigned j=0; j < aStepsTypeAddTo.size(); j++ )
|
||||
if( st == aStepsTypeAddTo[j] ) { found = true; break; }
|
||||
if(found) continue;
|
||||
|
||||
aStepsTypeAddTo.push_back( st );
|
||||
|
||||
@@ -92,7 +92,7 @@ void RageSoundMixBuffer::read( float *pBuf )
|
||||
|
||||
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 )
|
||||
pBufs[ch][i] = m_pMixbuf[channels * i + ch];
|
||||
m_iBufUsed = 0;
|
||||
|
||||
@@ -95,7 +95,7 @@ static void ZoomSurface( const RageSurface * src, RageSurface * dst )
|
||||
const int width = dst->w;
|
||||
for( int y = 0; y < height; y++ )
|
||||
{
|
||||
uint32_t *dp = (uint32_t *) (dst->pixels + dst->pitch*y);
|
||||
uint8_t *dp = (uint8_t *) (dst->pixels + dst->pitch*y);
|
||||
/* current source pointer and next source pointer (first and second
|
||||
* rows sampled for this row): */
|
||||
const uint8_t *csp = sp + esy0[y] * src->pitch;
|
||||
@@ -109,7 +109,6 @@ static void ZoomSurface( const RageSurface * src, RageSurface * dst )
|
||||
const uint8_t *c10 = ncsp + esx0[x]*4;
|
||||
const uint8_t *c11 = ncsp + esx1[x]*4;
|
||||
|
||||
uint8_t color[4];
|
||||
for( int c = 0; c < 4; ++c )
|
||||
{
|
||||
uint32_t x0 = uint32_t(c00[c]) * ex0[x];
|
||||
@@ -120,12 +119,11 @@ static void ZoomSurface( const RageSurface * src, RageSurface * dst )
|
||||
x1 >>= 24;
|
||||
|
||||
const uint32_t res = ((x0 * ey0[y]) + (x1 * (16777216-ey0[y])) + 8388608) >> 24;
|
||||
color[c] = uint8_t(res);
|
||||
dp[c] = uint8_t(res);
|
||||
}
|
||||
*dp = *(uint32_t *) color;
|
||||
|
||||
// Advance destination pointer.
|
||||
++dp;
|
||||
dp += 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -390,12 +390,17 @@ static void CoinModeNoHome( int &sel, bool ToSel, const ConfOption *pConfOption
|
||||
if( ToSel )
|
||||
{
|
||||
MovePref<CoinMode>( sel, ToSel, pConfOption );
|
||||
sel--;
|
||||
// If the mode was Pay, the index is 0; otherwise, set the index
|
||||
// to 1 to avoid out-of-range crashing.
|
||||
if (sel == 1)
|
||||
sel = 0;
|
||||
else
|
||||
sel = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
int tmp = sel + 1;
|
||||
MovePref<CoinMode>( sel, ToSel, pConfOption );
|
||||
MovePref<CoinMode>( tmp, ToSel, pConfOption );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -119,8 +119,11 @@ namespace
|
||||
default: // CoinMode_Free
|
||||
if( GAMESTATE->PlayersCanJoin() )
|
||||
return CREDITS_FREE_PLAY.GetValue();
|
||||
// TODO: What should be displayed if players
|
||||
// can't join in free mode?
|
||||
}
|
||||
}
|
||||
return RString();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
+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() );
|
||||
return;
|
||||
@@ -1749,13 +1749,13 @@ void SongManager::LoadStepEditsFromProfileDir( const RString &sProfileDir, Profi
|
||||
GetDirListing( sDir+"*", vsGroups, true, false );
|
||||
|
||||
// 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]+"/";
|
||||
vector<RString> vsSongs;
|
||||
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;
|
||||
RString sSongDir = sGroupDir+vsSongs[j]+"/";
|
||||
@@ -1777,7 +1777,7 @@ void SongManager::LoadStepEditsFromProfileDir( const RString &sProfileDir, Profi
|
||||
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() );
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user