don't use member initialization

This commit is contained in:
Martin Michelsen
2024-06-28 10:10:39 -07:00
parent 4bd6ef12a9
commit 9f073d07cd
4 changed files with 56 additions and 53 deletions
+25 -25
View File
@@ -1187,31 +1187,31 @@ PlayerConfigNTE::PlayerConfigNTE(const PlayerConfig& config)
} }
PlayerConfigNTE::operator PlayerConfig() const { PlayerConfigNTE::operator PlayerConfig() const {
return { PlayerConfig ret;
.rank_text = this->rank_text, ret.rank_text = this->rank_text;
.unknown_a1 = this->unknown_a1, ret.unknown_a1 = this->unknown_a1;
.tech_menu_shortcut_entries = this->tech_menu_shortcut_entries, ret.tech_menu_shortcut_entries = this->tech_menu_shortcut_entries;
.choice_search_config = this->choice_search_config, ret.choice_search_config = this->choice_search_config;
.scenario_progress = this->scenario_progress, ret.scenario_progress = this->scenario_progress;
.unused_offline_records = this->unused_offline_records, ret.unused_offline_records = this->unused_offline_records;
.unknown_a4 = this->unknown_a4, ret.unknown_a4 = this->unknown_a4;
.is_encrypted = this->is_encrypted, ret.is_encrypted = this->is_encrypted;
.basis = this->basis, ret.basis = this->basis;
.unused = this->unused, ret.unused = this->unused;
.card_counts = this->card_counts, ret.card_counts = this->card_counts;
.card_count_checksums = this->card_count_checksums, ret.card_count_checksums = this->card_count_checksums;
.rare_tokens = this->rare_tokens, ret.rare_tokens = this->rare_tokens;
.decks = this->decks, ret.decks = this->decks;
.unknown_a8 = this->unknown_a8, ret.unknown_a8 = this->unknown_a8;
.offline_clv_exp = this->offline_clv_exp, ret.offline_clv_exp = this->offline_clv_exp;
.online_clv_exp = this->online_clv_exp, ret.online_clv_exp = this->online_clv_exp;
.recent_human_opponents = this->recent_human_opponents, ret.recent_human_opponents = this->recent_human_opponents;
.unknown_a10 = this->unknown_a10, ret.unknown_a10 = this->unknown_a10;
.init_timestamp = this->init_timestamp, ret.init_timestamp = this->init_timestamp;
.last_online_battle_start_timestamp = this->last_online_battle_start_timestamp, ret.last_online_battle_start_timestamp = this->last_online_battle_start_timestamp;
.unknown_t3 = this->unknown_t3, ret.unknown_t3 = this->unknown_t3;
.unknown_a14 = this->unknown_a14, ret.unknown_a14 = this->unknown_a14;
}; return ret;
} }
Rules::Rules(const JSON& json) { Rules::Rules(const JSON& json) {
+2 -1
View File
@@ -967,7 +967,8 @@ struct PlayerConfigNTE {
/* 1CC4 */ parray<uint8_t, 0x94> unknown_a14; /* 1CC4 */ parray<uint8_t, 0x94> unknown_a14;
/* 1D58 */ /* 1D58 */
PlayerConfigNTE(const PlayerConfig& config); PlayerConfigNTE() = default;
explicit PlayerConfigNTE(const PlayerConfig& config);
operator PlayerConfig() const; operator PlayerConfig() const;
void decrypt(); void decrypt();
+27 -27
View File
@@ -287,33 +287,33 @@ PSOGCEp3CharacterFile::Character::Character(const PSOGCEp3NTECharacter& nte)
} }
PSOGCEp3CharacterFile::Character::operator PSOGCEp3NTECharacter() const { PSOGCEp3CharacterFile::Character::operator PSOGCEp3NTECharacter() const {
return { PSOGCEp3NTECharacter ret;
.inventory = this->inventory, ret.inventory = this->inventory;
.disp = this->disp, ret.disp = this->disp;
.flags = this->flags, ret.flags = this->flags;
.creation_timestamp = this->creation_timestamp, ret.creation_timestamp = this->creation_timestamp;
.signature = this->signature, ret.signature = this->signature;
.play_time_seconds = this->play_time_seconds, ret.play_time_seconds = this->play_time_seconds;
.option_flags = this->option_flags, ret.option_flags = this->option_flags;
.save_count = this->save_count, ret.save_count = this->save_count;
.ppp_username = this->ppp_username, ret.ppp_username = this->ppp_username;
.ppp_password = this->ppp_password, ret.ppp_password = this->ppp_password;
.seq_vars = this->seq_vars, ret.seq_vars = this->seq_vars;
.death_count = this->death_count, ret.death_count = this->death_count;
.bank = this->bank, ret.bank = this->bank;
.guild_card = this->guild_card, ret.guild_card = this->guild_card;
.symbol_chats = this->symbol_chats, ret.symbol_chats = this->symbol_chats;
.chat_shortcuts = this->chat_shortcuts, ret.chat_shortcuts = this->chat_shortcuts;
.auto_reply = this->auto_reply, ret.auto_reply = this->auto_reply;
.info_board = this->info_board, ret.info_board = this->info_board;
.battle_records = this->battle_records, ret.battle_records = this->battle_records;
.unknown_a10 = this->unknown_a10, ret.unknown_a10 = this->unknown_a10;
.challenge_record_stats = this->challenge_record_stats, ret.challenge_record_stats = this->challenge_record_stats;
.ep3_config = this->ep3_config, ret.ep3_config = Episode3::PlayerConfigNTE(this->ep3_config);
.unknown_a11 = this->unknown_a11, ret.unknown_a11 = this->unknown_a11;
.unknown_a12 = this->unknown_a12, ret.unknown_a12 = this->unknown_a12;
.unknown_a13 = this->unknown_a13, ret.unknown_a13 = this->unknown_a13;
}; return ret;
} }
void PSOBBGuildCardFile::Entry::clear() { void PSOBBGuildCardFile::Entry::clear() {
+2
View File
@@ -565,6 +565,8 @@ struct PSOGCEp3NTECharacter {
/* 4614:41F8 */ be_uint32_t unknown_a12 = 0; /* 4614:41F8 */ be_uint32_t unknown_a12 = 0;
/* 4618:41FC */ be_uint32_t unknown_a13 = 0; /* 4618:41FC */ be_uint32_t unknown_a13 = 0;
/* 461C:4200 */ /* 461C:4200 */
PSOGCEp3NTECharacter() = default;
} __packed_ws__(PSOGCEp3NTECharacter, 0x461C); } __packed_ws__(PSOGCEp3NTECharacter, 0x461C);
struct PSOGCEp3CharacterFile { struct PSOGCEp3CharacterFile {