Commit d12b4100 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Some explicit casting to int to ensure the compiler we are fine

GIT_SILENT
parent be266e64
......@@ -227,7 +227,7 @@ void Ai::calculateNextPositions()
nextPositions(ship[i]->toAiSprite(),shipsNextPositions[i],
calcFrameIncrement[Options::aiDifficulty(playerNumber)]);
if(cfg->maxMines > aiMines[0]->size())
if(cfg->maxMines > static_cast<uint>(aiMines[0]->size()))
for(i=0;i<2;++i)
aiMines[i]->resize(cfg->maxMines);
......@@ -262,7 +262,7 @@ void Ai::tryShots()
//if too much bullets are on the playfield, no shot is tried
if(bullets[playerNumber]->count() <
(cfg->maxBullets+ship[playerNumber]->getBulletPowerups()))
(static_cast<int>(cfg->maxBullets) + ship[playerNumber]->getBulletPowerups()))
{
for(f=0;f<=frameNum;++f)
{
......
......@@ -683,7 +683,7 @@ void MyMainView::moveShips()
if((en>config.shotEnergyNeed) && (!ship[i]->reloadsBullet()))
{
if(bullets[i]->count() <
(config.maxBullets+ship[i]->getBulletPowerups()))
(static_cast<int>(config.maxBullets) + ship[i]->getBulletPowerups()))
{
ship[i]->bullet(config.bulletReloadTime);
en-=config.shotEnergyNeed;
......@@ -711,7 +711,7 @@ void MyMainView::moveShips()
if((en>config.mineEnergyNeed) && (!ship[i]->reloadsMine()))
{
if(mines[i]->count() <
(config.maxMines+ship[i]->getMinePowerups()))
(static_cast<int>(config.maxMines) + ship[i]->getMinePowerups()))
{
ship[i]->mine(config.mineReloadTime);
en-=config.mineEnergyNeed;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment