From 476bc01a9d96f2b0a34ef21ab475d39a2a6b52a8 Mon Sep 17 00:00:00 2001 From: Ted Percival Date: Fri, 25 Mar 2005 12:37:17 +0000 Subject: [PATCH] replace arbitrarilyy "big" initialisers with those from --- stepmania/src/BPMDisplay.cpp | 6 ++++-- stepmania/src/Course.cpp | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/stepmania/src/BPMDisplay.cpp b/stepmania/src/BPMDisplay.cpp index b5d18368fd..ba720520ee 100644 --- a/stepmania/src/BPMDisplay.cpp +++ b/stepmania/src/BPMDisplay.cpp @@ -9,6 +9,8 @@ #include "ActorUtil.h" #include "CommonMetrics.h" +#include + BPMDisplay::BPMDisplay() { m_fBPMFrom = m_fBPMTo = 0; @@ -101,8 +103,8 @@ void BPMDisplay::SetBPMRange( const DisplayBpms &bpms ) if( !(bool)CYCLE ) { - int MinBPM=99999999; - int MaxBPM=-99999999; + int MinBPM = INT_MAX; + int MaxBPM = INT_MIN; for( unsigned i = 0; i < BPMS.size(); ++i ) { MinBPM = min( MinBPM, (int) roundf(BPMS[i]) ); diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 42cc403c78..c9c86ef4a8 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -20,6 +20,8 @@ #include "ProfileManager.h" #include "Foreach.h" +#include + /* Amount to increase meter ranges to make them difficult: */ 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 ) m_SortOrder_Ranking = 3; - m_SortOrder_TotalDifficulty = 999999; // large number + m_SortOrder_TotalDifficulty = INT_MAX; return; }