Commit d2168a8c authored by salix5's avatar salix5

use default member initializer

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