Commit 62fe61c7 authored by Chen Bill's avatar Chen Bill

update aggregate initialization

parent 34376c88
...@@ -92,12 +92,12 @@ public: ...@@ -92,12 +92,12 @@ public:
std::set<ClientCard*> ownerTarget; std::set<ClientCard*> ownerTarget;
std::map<int, int> counters; std::map<int, int> counters;
std::map<int, int> desc_hints; std::map<int, int> desc_hints;
wchar_t atkstring[16]{ 0 }; wchar_t atkstring[16]{};
wchar_t defstring[16]{ 0 }; wchar_t defstring[16]{};
wchar_t lvstring[16]{ 0 }; wchar_t lvstring[16]{};
wchar_t linkstring[16]{ 0 }; wchar_t linkstring[16]{};
wchar_t lscstring[16]{ 0 }; wchar_t lscstring[16]{};
wchar_t rscstring[16]{ 0 }; wchar_t rscstring[16]{};
ClientCard() = default; ClientCard() = default;
~ClientCard(); ~ClientCard();
......
...@@ -46,7 +46,7 @@ public: ...@@ -46,7 +46,7 @@ public:
std::vector<int> select_options; std::vector<int> select_options;
std::vector<int> select_options_index; std::vector<int> select_options_index;
std::vector<ChainInfo> chains; std::vector<ChainInfo> chains;
int extra_p_count[2]{ 0 }; int extra_p_count[2]{};
size_t selected_option{ 0 }; size_t selected_option{ 0 };
ClientCard* attacker{ nullptr }; ClientCard* attacker{ nullptr };
...@@ -77,7 +77,7 @@ public: ...@@ -77,7 +77,7 @@ public:
bool remove_act{ false }; bool remove_act{ false };
bool deck_act{ false }; bool deck_act{ false };
bool extra_act{ false }; bool extra_act{ false };
bool pzone_act[2]{ false }; bool pzone_act[2]{};
bool conti_act{ false }; bool conti_act{ false };
bool chain_forced{ false }; bool chain_forced{ false };
ChainInfo current_chain; ChainInfo current_chain;
......
...@@ -74,23 +74,23 @@ struct DuelInfo { ...@@ -74,23 +74,23 @@ struct DuelInfo {
bool isTag{ false }; bool isTag{ false };
bool isSingleMode{ false }; bool isSingleMode{ false };
bool is_shuffling{ false }; bool is_shuffling{ false };
bool tag_player[2]{ false }; bool tag_player[2]{};
bool isReplaySwapped{ false }; bool isReplaySwapped{ false };
int lp[2]{ 0 }; int lp[2]{};
int start_lp{ 0 }; int start_lp{ 0 };
int duel_rule{ 0 }; int duel_rule{ 0 };
int turn{ 0 }; int turn{ 0 };
short curMsg{ 0 }; short curMsg{ 0 };
wchar_t hostname[20]{ 0 }; wchar_t hostname[20]{};
wchar_t clientname[20]{ 0 }; wchar_t clientname[20]{};
wchar_t hostname_tag[20]{ 0 }; wchar_t hostname_tag[20]{};
wchar_t clientname_tag[20]{ 0 }; wchar_t clientname_tag[20]{};
wchar_t strLP[2][16]{ 0 }; wchar_t strLP[2][16]{};
wchar_t* vic_string{ 0 }; wchar_t* vic_string{ nullptr };
unsigned char player_type{ 0 }; unsigned char player_type{ 0 };
unsigned char time_player{ 0 }; unsigned char time_player{ 0 };
unsigned short time_limit{ 0 }; unsigned short time_limit{ 0 };
unsigned short time_left[2]{ 0 }; unsigned short time_left[2]{};
void Clear(); void Clear();
}; };
......
...@@ -45,12 +45,12 @@ private: ...@@ -45,12 +45,12 @@ private:
int WriteUpdateData(int& player, int location, int& flag, unsigned char*& qbuf, int& use_cache); int WriteUpdateData(int& player, int location, int& flag, unsigned char*& qbuf, int& use_cache);
protected: protected:
DuelPlayer* players[2]{ nullptr }; DuelPlayer* players[2]{};
DuelPlayer* pplayer[2]{nullptr}; DuelPlayer* pplayer[2]{};
bool ready[2]{ false }; bool ready[2]{};
Deck pdeck[2]; Deck pdeck[2];
int deck_error[2]{ 0 }; int deck_error[2]{};
unsigned char hand_result[2]{ 0 }; unsigned char hand_result[2]{};
unsigned char last_response{ 0 }; unsigned char last_response{ 0 };
std::set<DuelPlayer*> observers; std::set<DuelPlayer*> observers;
Replay last_replay; Replay last_replay;
...@@ -58,8 +58,8 @@ protected: ...@@ -58,8 +58,8 @@ protected:
int match_kill{ 0 }; int match_kill{ 0 };
unsigned char duel_count{ 0 }; unsigned char duel_count{ 0 };
unsigned char tp_player{ 0 }; unsigned char tp_player{ 0 };
unsigned char match_result[3]{ 0 }; unsigned char match_result[3]{};
short time_limit[2]{ 0 }; short time_limit[2]{};
short time_elapsed{ 0 }; short time_elapsed{ 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