Skip to content

Commit

Permalink
clean up random compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 15, 2017
1 parent 39580f8 commit eae224d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/ScreenDebugOverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ static HighScore MakeRandomHighScore( float fPercentDP )
RadarValues rv;
FOREACH_ENUM( RadarCategory, rc )
{
rv[rc] = randomf( 0, 1 );
rv[rc] = static_cast<int>(randomf( 0, 1 ));
}
hs.SetRadarValues( rv );

Expand Down
15 changes: 5 additions & 10 deletions src/ScreenEvaluation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ void ScreenEvaluation::Init()
// todo: convert this to use category names instead of numbers? -aj
for( int r=0; r<NUM_SHOWN_RADAR_CATEGORIES; r++ ) // foreach line
{
float possible= m_pStageStats->m_player[p].m_radarPossible[r];
float actual= m_pStageStats->m_player[p].m_radarActual[r];
float possible= static_cast<float>(m_pStageStats->m_player[p].m_radarPossible[r]);
float actual= static_cast<float>(m_pStageStats->m_player[p].m_radarActual[r]);
if(possible > 1.0)
{
actual /= possible;
Expand Down Expand Up @@ -521,7 +521,7 @@ void ScreenEvaluation::Init()
DEFAULT_FAIL( l );
}

m_textJudgmentLineNumber[l][p].SetTargetNumber( iValue );
m_textJudgmentLineNumber[l][p].SetTargetNumber( static_cast<float>(iValue) );
}
}
}
Expand Down Expand Up @@ -580,7 +580,7 @@ void ScreenEvaluation::Init()
m_textScore[p].Load( "RollingNumbersEvaluation" );
ActorUtil::LoadAllCommands( m_textScore[p], m_sName );
SET_XY( m_textScore[p] );
m_textScore[p].SetTargetNumber( m_pStageStats->m_player[p].m_iScore );
m_textScore[p].SetTargetNumber( static_cast<float>(m_pStageStats->m_player[p].m_iScore) );
this->AddChild( &m_textScore[p] );
}
}
Expand Down Expand Up @@ -666,12 +666,7 @@ void ScreenEvaluation::Init()
}
else
{
switch( GAMESTATE->m_PlayMode )
{
default:
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation "+GradeToOldString(best_grade)) );
break;
}
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("evaluation "+GradeToOldString(best_grade)) );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/WheelBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "ThemeMetric.h"
#include "LuaExpressionTransform.h"

#define NUM_WHEEL_ITEMS ((int)ceil(NUM_WHEEL_ITEMS_TO_DRAW+2))
#define NUM_WHEEL_ITEMS (static_cast<int>(ceil(NUM_WHEEL_ITEMS_TO_DRAW+2)))

enum WheelState {
STATE_SELECTING,
Expand Down

0 comments on commit eae224d

Please sign in to comment.