Integrate C++11 branch into 5_1-new

This commit is contained in:
teejusb
2019-06-22 12:35:38 -07:00
444 changed files with 19503 additions and 21007 deletions
+8 -13
View File
@@ -4,7 +4,7 @@
#include "RageUtil.h"
#include "ThemeMetric.h"
#include "EnumHelper.h"
#include "Foreach.h"
#include "LuaManager.h"
#include "GameManager.h"
#include "LocalizedString.h"
@@ -375,10 +375,10 @@ void DisplayBpms::Add( float f )
float DisplayBpms::GetMin() const
{
float fMin = FLT_MAX;
FOREACH_CONST( float, vfBpms, f )
for (float const &f : vfBpms)
{
if( *f != -1 )
fMin = min( fMin, *f );
if( f != -1 )
fMin = min( fMin, f );
}
if( fMin == FLT_MAX )
return 0;
@@ -394,10 +394,10 @@ float DisplayBpms::GetMax() const
float DisplayBpms::GetMaxWithin(float highest) const
{
float fMax = 0;
FOREACH_CONST( float, vfBpms, f )
for (float const &f : vfBpms)
{
if( *f != -1 )
fMax = clamp(max( fMax, *f ), 0, highest);
if( f != -1 )
fMax = clamp(max( fMax, f ), 0, highest);
}
return fMax;
}
@@ -409,12 +409,7 @@ bool DisplayBpms::BpmIsConstant() const
bool DisplayBpms::IsSecret() const
{
FOREACH_CONST( float, vfBpms, f )
{
if( *f == -1 )
return true;
}
return false;
return std::any_of(vfBpms.begin(), vfBpms.end(), [](float const &f) { return f == -1; });
}
static const char *StyleTypeNames[] = {