implemented custom max(), because std::vector::size() returns different types on msvc vs. gcc
This commit is contained in:
parent
d7dcb2425e
commit
daa6f236be
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
namespace Math
|
||||
{
|
||||
template<typename T, typename U, typename V>
|
||||
inline T max(U first, V second)
|
||||
{
|
||||
return static_cast<T>(first >= second ? first : second);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,4 +2,5 @@
|
|||
|
||||
#include <Physics.h>
|
||||
#include <Random.h>
|
||||
#include <Color.h>
|
||||
#include <Color.h>
|
||||
#include <Math.h>
|
||||
|
|
@ -607,7 +607,7 @@ void Game::soundSystem()
|
|||
|
||||
void Game::scoreSystem()
|
||||
{
|
||||
player.mult = (int)std::max(balls.size(), 1ull);
|
||||
player.mult = Math::max<int>(balls.size(), 1);
|
||||
for (auto& brick : bricks)
|
||||
{
|
||||
if (!brick.alive)
|
||||
|
|
|
|||
Loading…
Reference in New Issue