probably fix DisplayBpms::BpmIsConstant problems
const fixes
This commit is contained in:
@@ -179,7 +179,7 @@ void DisplayBpms::Add( float f )
|
|||||||
vfBpms.push_back( f );
|
vfBpms.push_back( f );
|
||||||
}
|
}
|
||||||
|
|
||||||
float DisplayBpms::GetMin()
|
float DisplayBpms::GetMin() const
|
||||||
{
|
{
|
||||||
float fMin = 99999;
|
float fMin = 99999;
|
||||||
FOREACH_CONST( float, vfBpms, f )
|
FOREACH_CONST( float, vfBpms, f )
|
||||||
@@ -193,7 +193,7 @@ float DisplayBpms::GetMin()
|
|||||||
return fMin;
|
return fMin;
|
||||||
}
|
}
|
||||||
|
|
||||||
float DisplayBpms::GetMax()
|
float DisplayBpms::GetMax() const
|
||||||
{
|
{
|
||||||
float fMax = 0;
|
float fMax = 0;
|
||||||
FOREACH_CONST( float, vfBpms, f )
|
FOREACH_CONST( float, vfBpms, f )
|
||||||
@@ -204,12 +204,12 @@ float DisplayBpms::GetMax()
|
|||||||
return fMax;
|
return fMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DisplayBpms::BpmIsConstant()
|
bool DisplayBpms::BpmIsConstant() const
|
||||||
{
|
{
|
||||||
return GetMin() == GetMax();
|
return fabsf( GetMin() - GetMax() ) < 0.001f;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DisplayBpms::IsMystery()
|
bool DisplayBpms::IsMystery() const
|
||||||
{
|
{
|
||||||
FOREACH_CONST( float, vfBpms, f )
|
FOREACH_CONST( float, vfBpms, f )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -316,10 +316,10 @@ PeakComboAward StringToPeakComboAward( const CString& pma );
|
|||||||
struct DisplayBpms
|
struct DisplayBpms
|
||||||
{
|
{
|
||||||
void Add( float f );
|
void Add( float f );
|
||||||
float GetMin();
|
float GetMin() const;
|
||||||
float GetMax();
|
float GetMax() const;
|
||||||
bool BpmIsConstant();
|
bool BpmIsConstant() const;
|
||||||
bool IsMystery();
|
bool IsMystery() const;
|
||||||
vector<float> vfBpms;
|
vector<float> vfBpms;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user