diff --git a/common/machihai.h b/common/machihai.h index 92a79e6f..17098849 100644 --- a/common/machihai.h +++ b/common/machihai.h @@ -19,6 +19,7 @@ struct MachihaiInfo { // 待ち牌とかの情報を格納(chkFuriten関数用) InfoByTile Machihai; // 待ち牌情報 int8_t MachihaiTotal; // 待ち牌の合計枚数 int8_t MachiMen; // 何面待ち? + MachihaiInfo() : FuritenFlag(), Machihai(), MachihaiTotal(), MachiMen() {} }; static_assert(std::is_trivially_copyable::value, "MachihaiInfo is not trivially copyable"); static_assert(std::is_standard_layout::value, "MachihaiInfo is not standard layout"); @@ -27,6 +28,10 @@ struct TileStatus { // gettilestatus用 bool isExistent, canFormQuad, seqMidWait, seqDoubleSideWait, seqSingleSideWait, formsPair, formsSequence, formsTriplet; + TileStatus() : isExistent(), canFormQuad(), + seqMidWait(), seqDoubleSideWait(), seqSingleSideWait(), + formsPair(), formsSequence(), formsTriplet() + {} }; static_assert(std::is_trivially_copyable::value, "TileStatus is not trivially copyable"); static_assert(std::is_standard_layout::value, "TileStatus is not standard layout"); diff --git a/common/tilecode.h b/common/tilecode.h index 662e6a5c..a8b73efb 100644 --- a/common/tilecode.h +++ b/common/tilecode.h @@ -126,6 +126,7 @@ template class InfoByTile { // 牌ごとに指定した型による情 T& operator[](const int tile) { return InfoByTile::operator[](static_cast(tile)); } + InfoByTile() : val() {} }; template class InfoByTile; diff --git a/common/version.h b/common/version.h index fe140010..16cf2b31 100644 --- a/common/version.h +++ b/common/version.h @@ -2,13 +2,13 @@ #define MIHAJONG_MAJOR_VER 2 #define MIHAJONG_MINOR_VER 4 -#define MIHAJONG_PATCH_VER 1 -#define MIHAJONG_VER "2.4.1" +#define MIHAJONG_PATCH_VER 2 +#define MIHAJONG_VER "2.4.2" #define MJCORE_MAJOR_VER 2 #define MJCORE_MINOR_VER 4 -#define MJCORE_PATCH_VER 0 -#define MJCORE_VER "2.4.0" +#define MJCORE_PATCH_VER 2 +#define MJCORE_VER "2.4.2" #define LOGGER_MAJOR_VER 2 #define LOGGER_MINOR_VER 4 @@ -32,8 +32,8 @@ #define GRAPHIC_MAJOR_VER 2 #define GRAPHIC_MINOR_VER 4 -#define GRAPHIC_PATCH_VER 0 -#define GRAPHIC_VER "2.4.0" +#define GRAPHIC_PATCH_VER 2 +#define GRAPHIC_VER "2.4.2" #define CONFIG_MAJOR_VER 2 #define CONFIG_MINOR_VER 4 diff --git a/doc/history.md b/doc/history.md index d09e47d0..ca91af15 100644 --- a/doc/history.md +++ b/doc/history.md @@ -5,6 +5,10 @@ Copyright (c) 2008-2013, 2019-2020 MihailJP バージョン履歴 --------------- +### [2.4.2] 2021年11月9日 + +- Ver2.4.xでデータが正しく初期化されていなかったのを修正 + ### [2.4.1] 2021年11月9日 - Ver2.4.0で瀬戸内三麻の実行ファイルがないのを修正 diff --git a/mjcore/yaku/yaku.h b/mjcore/yaku/yaku.h index ff7bebc1..514da5f6 100644 --- a/mjcore/yaku/yaku.h +++ b/mjcore/yaku/yaku.h @@ -88,6 +88,10 @@ class yaku::yakuCalculator { bool TsumoAgariFlag() const { // ツモアガリどうかのフラグ return GameStat->TsumoAgariFlag; } + MentsuAnalysis() : + player(), BasePoint(), GameStat(), Machi(), MianziDat(), isPinfu(), + TotalKezi(), TotalAnKezi(), TotalShunzi(), TotalAnShunzi(), TotalKangzi(), TotalAnKangzi(), TotalKaKangzi() + {} }; #ifdef MJCORE_EXPORTS static_assert(std::is_trivially_copyable::value, "MentsuAnalysis is not trivially copyable");