Skip to content

Commit

Permalink
データが正しく初期化されていなかったのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
MihailJP committed Nov 9, 2021
1 parent 661e1e6 commit 290eaa4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
5 changes: 5 additions & 0 deletions common/machihai.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct MachihaiInfo { // 待ち牌とかの情報を格納(chkFuriten関数用)
InfoByTile<MachihaiTileInfo> Machihai; // 待ち牌情報
int8_t MachihaiTotal; // 待ち牌の合計枚数
int8_t MachiMen; // 何面待ち?
MachihaiInfo() : FuritenFlag(), Machihai(), MachihaiTotal(), MachiMen() {}
};
static_assert(std::is_trivially_copyable<MachihaiInfo>::value, "MachihaiInfo is not trivially copyable");
static_assert(std::is_standard_layout<MachihaiInfo>::value, "MachihaiInfo is not standard layout");
Expand All @@ -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<TileStatus>::value, "TileStatus is not trivially copyable");
static_assert(std::is_standard_layout<TileStatus>::value, "TileStatus is not standard layout");
Expand Down
1 change: 1 addition & 0 deletions common/tilecode.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ template <class T> class InfoByTile { // 牌ごとに指定した型による情
T& operator[](const int tile) {
return InfoByTile::operator[](static_cast<TileCode>(tile));
}
InfoByTile() : val() {}
};

template class InfoByTile<bool>;
Expand Down
12 changes: 6 additions & 6 deletions common/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions doc/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -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で瀬戸内三麻の実行ファイルがないのを修正
Expand Down
4 changes: 4 additions & 0 deletions mjcore/yaku/yaku.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<MentsuAnalysis>::value, "MentsuAnalysis is not trivially copyable");
Expand Down

0 comments on commit 290eaa4

Please sign in to comment.