Skip to content

Commit

Permalink
aai: use initialization list
Browse files Browse the repository at this point in the history
(cppcheck warning)
  • Loading branch information
abma committed Mar 3, 2015
1 parent cdc85b0 commit b1a8011
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions AI/Skirmish/AAI/aidef.h
Expand Up @@ -36,8 +36,20 @@ void ReplaceExtension(const char *n, char *dst, int s, const char *ext);
class AAIMetalSpot
{
public:
AAIMetalSpot(float3 pos, float amount) {this->pos = pos; this->amount = amount; occupied = false; extractor = -1; extractor_def = -1;}
AAIMetalSpot() {pos = ZeroVector; amount = 0; occupied = false; extractor = -1; extractor_def = -1;}
AAIMetalSpot(float3 _pos, float _amount):
pos(_pos),
occupied(false),
extractor(-1),
extractor_def(-1),
amount(_amount)
{}
AAIMetalSpot():
pos(ZeroVector),
occupied(false),
extractor(-1),
extractor_def(-1),
amount(0)
{}

float3 pos;
bool occupied;
Expand Down

0 comments on commit b1a8011

Please sign in to comment.