From 20e10150a246a4b25f81c008e7b7c8f8e28b661c Mon Sep 17 00:00:00 2001 From: Hourier <66951241+Hourier@users.noreply.github.com> Date: Sun, 24 Jul 2022 21:56:40 +0900 Subject: [PATCH] =?utf8?q?[Fix]=20#2531=20VS2022=E7=92=B0=E5=A2=83?= =?utf8?q?=E3=81=A7std::array=20=E5=9E=8B=E3=81=AE=E5=A4=89?= =?utf8?q?=E6=95=B0=E5=AE=A3=E8=A8=80=E3=81=A7=E3=82=B3=E3=83=B3=E3=83=91?= =?utf8?q?=E3=82=A4=E3=83=AB=E8=AD=A6=E5=91=8A=E3=81=8C=E5=87=BA=E3=81=A6?= =?utf8?q?=E3=81=84=E3=81=9F=E3=81=AE=E3=82=92=E8=A7=A3=E6=B6=88=E3=81=97?= =?utf8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/mind/mind-blue-mage.h | 4 ++-- src/mind/mind-elementalist.cpp | 32 ++++++++++++++++---------------- src/object-enchant/tr-types.h | 8 ++++---- src/player/player-skill.cpp | 12 ++++++------ src/util/rng-xoshiro.cpp | 14 +++++++------- src/wizard/wizard-spoiler.cpp | 4 ++-- 6 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/mind/mind-blue-mage.h b/src/mind/mind-blue-mage.h index 732ab0986..f7bd9e032 100644 --- a/src/mind/mind-blue-mage.h +++ b/src/mind/mind-blue-mage.h @@ -13,10 +13,10 @@ enum class BlueMagicType { class PlayerType; bool do_cmd_cast_learned(PlayerType *player_ptr); -inline constexpr std::array BLUE_MAGIC_TYPE_LIST = { +inline constexpr std::array BLUE_MAGIC_TYPE_LIST = { { BlueMagicType::BOLT, BlueMagicType::BALL, BlueMagicType::BREATH, BlueMagicType::SUMMON, BlueMagicType::OTHER, -}; +} }; diff --git a/src/mind/mind-elementalist.cpp b/src/mind/mind-elementalist.cpp index 550df4921..c4e333130 100644 --- a/src/mind/mind-elementalist.cpp +++ b/src/mind/mind-elementalist.cpp @@ -132,64 +132,64 @@ static element_type_list element_types = { { ElementRealmType::FIRE, { _("炎", "Fire"), - { AttributeType::FIRE, AttributeType::HELL_FIRE, AttributeType::PLASMA }, - { _("火炎", "Fire"), _("業火", "Hell Fire"), _("プラズマ", "Plasma") }, + { { AttributeType::FIRE, AttributeType::HELL_FIRE, AttributeType::PLASMA } }, + { { _("火炎", "Fire"), _("業火", "Hell Fire"), _("プラズマ", "Plasma") } }, { }, } }, { ElementRealmType::ICE, { _("氷", "Ice"), - { AttributeType::COLD, AttributeType::INERTIAL, AttributeType::TIME }, - { _("冷気", "Ice"), _("遅鈍", "Inertia"), _("時間逆転", "Time Stream") }, + { { AttributeType::COLD, AttributeType::INERTIAL, AttributeType::TIME } }, + { { _("冷気", "Ice"), _("遅鈍", "Inertia"), _("時間逆転", "Time Stream") } }, { { AttributeType::COLD, AttributeType::ICE} }, } }, { ElementRealmType::SKY, { _("空", "Sky"), - { AttributeType::ELEC, AttributeType::LITE, AttributeType::MANA }, - { _("電撃", "Lightning"), _("光", "Light"), _("魔力", "Mana") }, + { { AttributeType::ELEC, AttributeType::LITE, AttributeType::MANA } }, + { { _("電撃", "Lightning"), _("光", "Light"), _("魔力", "Mana") } }, { }, } }, { ElementRealmType::SEA, { _("海", "Sea"), - { AttributeType::ACID, AttributeType::WATER, AttributeType::DISINTEGRATE }, - { _("酸", "Acid"), _("水", "Water"), _("分解", "Disintegration") }, + { { AttributeType::ACID, AttributeType::WATER, AttributeType::DISINTEGRATE } }, + { { _("酸", "Acid"), _("水", "Water"), _("分解", "Disintegration") } }, { }, } }, { ElementRealmType::DARKNESS, { _("闇", "Darkness"), - { AttributeType::DARK, AttributeType::NETHER, AttributeType::VOID_MAGIC }, - { _("暗黒", "Darkness"), _("地獄", "Nether"), _("虚無", "void") }, + { { AttributeType::DARK, AttributeType::NETHER, AttributeType::VOID_MAGIC } }, + { { _("暗黒", "Darkness"), _("地獄", "Nether"), _("虚無", "void") } }, { { AttributeType::DARK, AttributeType::ABYSS } }, } }, { ElementRealmType::CHAOS, { _("混沌", "Chaos"), - { AttributeType::CONFUSION, AttributeType::CHAOS, AttributeType::NEXUS }, - { _("混乱", "Confusion"), _("カオス", "Chaos"), _("因果混乱", "Nexus") }, + { { AttributeType::CONFUSION, AttributeType::CHAOS, AttributeType::NEXUS } }, + { { _("混乱", "Confusion"), _("カオス", "Chaos"), _("因果混乱", "Nexus") } }, { }, } }, { ElementRealmType::EARTH, { _("地", "Earth"), - { AttributeType::SHARDS, AttributeType::FORCE, AttributeType::METEOR }, - { _("破片", "Shards"), _("フォース", "Force"), _("隕石", "Meteor") }, + { { AttributeType::SHARDS, AttributeType::FORCE, AttributeType::METEOR } }, + { { _("破片", "Shards"), _("フォース", "Force"), _("隕石", "Meteor") } }, { }, } }, { ElementRealmType::DEATH, { _("瘴気", "Death"), - { AttributeType::POIS, AttributeType::HYPODYNAMIA, AttributeType::DISENCHANT }, - { _("毒", "Poison"), _("吸血", "Drain Life"), _("劣化", "Disenchantment") }, + { { AttributeType::POIS, AttributeType::HYPODYNAMIA, AttributeType::DISENCHANT } }, + { { _("毒", "Poison"), _("吸血", "Drain Life"), _("劣化", "Disenchantment") } }, { }, } }, diff --git a/src/object-enchant/tr-types.h b/src/object-enchant/tr-types.h index 1a8729daa..bff1cb11a 100644 --- a/src/object-enchant/tr-types.h +++ b/src/object-enchant/tr-types.h @@ -182,21 +182,21 @@ enum tr_type : int32_t { }; /** 能力値(STR,INT,WIS,DEX,CON,CHR)のpvalを増減させるフラグのリスト */ -inline constexpr std::array TR_STATUS_LIST = { +inline constexpr std::array TR_STATUS_LIST = { { TR_STR, TR_INT, TR_WIS, TR_DEX, TR_CON, TR_CHR, -}; +} }; /** 能力値(STR,INT,WIS,DEX,CON,CHR)を維持するフラグのリスト */ -inline constexpr std::array TR_SUST_STATUS_LIST = { +inline constexpr std::array TR_SUST_STATUS_LIST = { { TR_SUST_STR, TR_SUST_INT, TR_SUST_WIS, TR_SUST_DEX, TR_SUST_CON, TR_SUST_CHR, -}; +} }; diff --git a/src/player/player-skill.cpp b/src/player/player-skill.cpp index f5f318f82..454f09e80 100644 --- a/src/player/player-skill.cpp +++ b/src/player/player-skill.cpp @@ -239,8 +239,8 @@ concptr PlayerSkill::skill_rank_str(PlayerSkillRank rank) void PlayerSkill::gain_melee_weapon_exp(const ObjectType *o_ptr) { - const GainAmountList gain_amount_list{ 80, 10, 1, (one_in_(2) ? 1 : 0) }; - constexpr GainAmountList others_gain_amount_list{ 8, 1, 0, 0 }; + const GainAmountList gain_amount_list{ { 80, 10, 1, (one_in_(2) ? 1 : 0) } }; + constexpr GainAmountList others_gain_amount_list{ { 8, 1, 0, 0 } }; for (auto sval = 0U; sval < this->player_ptr->weapon_exp[o_ptr->tval].size(); ++sval) { auto &now_exp = this->player_ptr->weapon_exp[o_ptr->tval][sval]; @@ -253,8 +253,8 @@ void PlayerSkill::gain_melee_weapon_exp(const ObjectType *o_ptr) void PlayerSkill::gain_range_weapon_exp(const ObjectType *o_ptr) { - constexpr GainAmountList gain_amount_list{ 80, 25, 10, 2 }; - constexpr GainAmountList others_gain_amount_list{ 8, 2, 0, 0 }; + constexpr GainAmountList gain_amount_list{ { 80, 25, 10, 2 } }; + constexpr GainAmountList others_gain_amount_list{ { 8, 2, 0, 0 } }; for (auto sval = 0U; sval < this->player_ptr->weapon_exp[o_ptr->tval].size(); ++sval) { auto &now_exp = this->player_ptr->weapon_exp[o_ptr->tval][sval]; @@ -358,8 +358,8 @@ void PlayerSkill::gain_spell_skill_exp(int realm, int spell_idx) return; } - constexpr GainAmountList gain_amount_list_first{ 60, 8, 2, 1 }; - constexpr GainAmountList gain_amount_list_second{ 60, 8, 2, 0 }; + constexpr GainAmountList gain_amount_list_first{ { 60, 8, 2, 1 } }; + constexpr GainAmountList gain_amount_list_second{ { 60, 8, 2, 0 } }; const auto is_first_realm = (realm == this->player_ptr->realm1); const auto *s_ptr = &mp_ptr->info[realm - 1][spell_idx]; diff --git a/src/util/rng-xoshiro.cpp b/src/util/rng-xoshiro.cpp index 2cd5edeb0..da438e98b 100644 --- a/src/util/rng-xoshiro.cpp +++ b/src/util/rng-xoshiro.cpp @@ -20,13 +20,13 @@ uint32_t u32b_rotl(uint32_t x, int k) * @brief デフォルトシードで乱数の内部状態を初期化したXoshiro128StarStarクラスのオブジェクトを生成する */ Xoshiro128StarStar::Xoshiro128StarStar() - : rng_state{ - // default seeds - 123456789, - 362436069, - 521288629, - 88675123, - } + : rng_state{ { + // default seeds + 123456789, + 362436069, + 521288629, + 88675123, + } } { } diff --git a/src/wizard/wizard-spoiler.cpp b/src/wizard/wizard-spoiler.cpp index 69cf201e9..0d12e77df 100644 --- a/src/wizard/wizard-spoiler.cpp +++ b/src/wizard/wizard-spoiler.cpp @@ -167,14 +167,14 @@ SpoilerOutputResultType spoil_categorized_mon_desc() return status; } -const std::array wiz_spell_stat = { +const std::array wiz_spell_stat = { { _("腕力", "STR"), _("知能", "INT"), _("賢さ", "WIS"), _("器用さ", "DEX"), _("耐久力", "CON"), _("魅力", "CHR"), -}; +} }; static SpoilerOutputResultType spoil_player_spell(concptr fname) { -- 2.11.0