Commit d2168a8c authored by salix5's avatar salix5

use default member initializer

parent d1b1c9d4
......@@ -146,10 +146,10 @@ public:
location = 0;
sequence = 0;
}
uint8 playerid;
uint8 position;
uint8 location;
uint8 sequence;
uint8 playerid{ 0 };
uint8 position{ 0 };
uint8 location{ 0 };
uint8 sequence{ 0 };
};
int32 ref_handle;
duel* pduel;
......
......@@ -18,8 +18,6 @@ class effect;
bool effect_sort_id(const effect* e1, const effect* e2);
struct effect_set {
effect_set()
: count(0), container{ nullptr } {}
void add_item(effect* peffect) {
if(count >= 64) return;
container[count++] = peffect;
......@@ -66,11 +64,10 @@ struct effect_set {
}
private:
std::array<effect*, 64> container;
int count;
int count{ 0 };
};
struct effect_set_v {
effect_set_v() {}
void add_item(effect* peffect) {
container.push_back(peffect);
}
......
......@@ -167,8 +167,8 @@ struct processor {
using delayed_effect_collection = std::set<std::pair<effect*, tevent>>;
struct chain_limit_t {
chain_limit_t(int32 f, int32 p): function(f), player(p) {}
int32 function;
int32 player;
int32 function{ 0 };
int32 player{ PLAYER_NONE };
};
using chain_limit_list = std::vector<chain_limit_t>;
......
......@@ -3856,15 +3856,12 @@ int32 field::send_replace(uint16 step, group * targets, card * target) {
}
int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint32 reason, uint8 reason_player) {
struct exargs {
group* targets;
group* targets{ nullptr };
card_set leave_field, leave_grave, leave_deck, detach;
bool show_decktop[2];
bool show_decktop[2]{ false };
card_vector cv;
card_vector::iterator cvit;
effect* predirect;
exargs()
: targets(nullptr), show_decktop{ FALSE }, predirect(nullptr) {}
effect* predirect{ nullptr };
} ;
switch(step) {
case 0: {
......
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