replace arbitrarilyy "big" initialisers with those from <limits.h>
This commit is contained in:
@@ -9,6 +9,8 @@
|
|||||||
#include "ActorUtil.h"
|
#include "ActorUtil.h"
|
||||||
#include "CommonMetrics.h"
|
#include "CommonMetrics.h"
|
||||||
|
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
BPMDisplay::BPMDisplay()
|
BPMDisplay::BPMDisplay()
|
||||||
{
|
{
|
||||||
m_fBPMFrom = m_fBPMTo = 0;
|
m_fBPMFrom = m_fBPMTo = 0;
|
||||||
@@ -101,8 +103,8 @@ void BPMDisplay::SetBPMRange( const DisplayBpms &bpms )
|
|||||||
|
|
||||||
if( !(bool)CYCLE )
|
if( !(bool)CYCLE )
|
||||||
{
|
{
|
||||||
int MinBPM=99999999;
|
int MinBPM = INT_MAX;
|
||||||
int MaxBPM=-99999999;
|
int MaxBPM = INT_MIN;
|
||||||
for( unsigned i = 0; i < BPMS.size(); ++i )
|
for( unsigned i = 0; i < BPMS.size(); ++i )
|
||||||
{
|
{
|
||||||
MinBPM = min( MinBPM, (int) roundf(BPMS[i]) );
|
MinBPM = min( MinBPM, (int) roundf(BPMS[i]) );
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
#include "ProfileManager.h"
|
#include "ProfileManager.h"
|
||||||
#include "Foreach.h"
|
#include "Foreach.h"
|
||||||
|
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
/* Amount to increase meter ranges to make them difficult: */
|
/* Amount to increase meter ranges to make them difficult: */
|
||||||
const int COURSE_DIFFICULTY_CLASS_CHANGE[NUM_DIFFICULTIES] = { -1, -1, 0, 1, 1 };
|
const int COURSE_DIFFICULTY_CLASS_CHANGE[NUM_DIFFICULTIES] = { -1, -1, 0, 1, 1 };
|
||||||
|
|
||||||
@@ -1191,7 +1193,7 @@ void Course::UpdateCourseStats( StepsType st )
|
|||||||
|
|
||||||
if ( m_SortOrder_Ranking == 2 )
|
if ( m_SortOrder_Ranking == 2 )
|
||||||
m_SortOrder_Ranking = 3;
|
m_SortOrder_Ranking = 3;
|
||||||
m_SortOrder_TotalDifficulty = 999999; // large number
|
m_SortOrder_TotalDifficulty = INT_MAX;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user