Fix compilation error/warning under gcc.

This commit is contained in:
Joris 2012-08-31 15:16:50 +02:00
parent e6281977e4
commit 331d43bee9
2 changed files with 3 additions and 3 deletions

View file

@ -46,8 +46,8 @@ static inline float deg2rad(int degrees)
CChunkParticle::CChunkParticle(CPosition position, Animation *smokeAnimation, Animation *debrisAnimation,
int minVelocity, int maxVelocity, int minTrajectoryAngle, int maxTTL) :
CParticle(position), initialPos(position), nextSmokeTicks(0), age(0),
maxTTL(maxTTL), height(0.f)
CParticle(position), initialPos(position), maxTTL(maxTTL), nextSmokeTicks(0),
age(0), height(0.f)
{
float radians = deg2rad(MyRand() % 360);
direction.x = cos(radians);

View file

@ -44,6 +44,7 @@
#include "unittype.h"
#include "upgrade.h"
#include <stdio.h>
/*----------------------------------------------------------------------------
-- Functions
----------------------------------------------------------------------------*/
@ -99,7 +100,6 @@ bool ButtonCheckUpgrade(const CUnit &unit, const ButtonAction &button)
*/
bool ButtonCheckUnitVariable(const CUnit &unit, const ButtonAction &button)
{
CPlayer *player = unit.Player;
char *buf = new_strdup(button.AllowStr.c_str());
for (const char *var = strtok(buf, ","); var; var = strtok(NULL, ",")) {