From 039ffea01618f03aa3025fed2bdcaef05bb138a9 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Wed, 26 Feb 2020 00:40:46 +0800 Subject: [PATCH] =?UTF-8?q?millList=20=E6=B8=85=E7=A9=BA=E6=97=B6=E5=8F=AA?= =?UTF-8?q?=E9=9C=80=E5=B0=86=20millListSize=20=E8=AE=BE=E7=BD=AE=E4=B8=BA?= =?UTF-8?q?0=E5=8D=B3=E5=8F=AF=E8=80=8C=E4=B8=8D=E9=9C=80=E8=A6=81=20memse?= =?UTF-8?q?t=20=E6=B8=85=E9=9B=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/game/board.cpp | 5 ----- src/game/position.cpp | 2 -- 2 files changed, 7 deletions(-) diff --git a/src/game/board.cpp b/src/game/board.cpp index 3b526ca1..3ec16e53 100644 --- a/src/game/board.cpp +++ b/src/game/board.cpp @@ -34,13 +34,11 @@ int Board::millTable[SQ_EXPANDED_COUNT][LINE_TYPES_COUNT][N_RINGS - 1] = { {{0}} Board::Board() { - memset(&millList, 0, sizeof(millList)); millListSize = 0; } Board::~Board() { - memset(&millList, 0, sizeof(millList)); millListSize = 0; } @@ -51,9 +49,6 @@ Board &Board::operator= (const Board &other) memcpy(this->locations, other.locations, sizeof(this->locations)); - memset(&millList, 0, sizeof(millList)); - millListSize = 0; - memcpy(&millList, &other.millList, sizeof(millList)); millListSize = other.millListSize; diff --git a/src/game/position.cpp b/src/game/position.cpp index b1c96e55..b605f8f1 100644 --- a/src/game/position.cpp +++ b/src/game/position.cpp @@ -159,7 +159,6 @@ bool Game::setPosition(const struct Rule *newRule, } // 清空成三记录 - memset(&position->board.millList, 0, sizeof(position->board.millList)); position->board.millListSize = 0; // 胜负标识 @@ -234,7 +233,6 @@ bool Game::reset() position->nPiecesNeedRemove = 0; // 清空成三记录 - memset(&position->board.millList, 0, sizeof(position->board.millList)); position->board.millListSize = 0; // 不选中棋子