From: H.G. Muller Date: Sun, 16 Jan 2011 20:56:14 +0000 (+0100) Subject: Remove superfluous copying of machine move X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=c8a5fc25c8c93671385ab3662214ce66c33ebf8d;p=xboard.git Remove superfluous copying of machine move There was explicit code in HandleMachineMove() and FinishMove() to put the move in the moveList, while MakeMove() already does this later in a more reliable way by calling CoordsToComputerAlgebraic(). This superfluous code is removed now. --- diff --git a/backend.c b/backend.c index 938e27f..89089f1 100644 --- a/backend.c +++ b/backend.c @@ -7330,11 +7330,6 @@ FakeBookMove: // [HGM] book: we jump here to simulate machine moves after book h if (cps->sendTime == 2) cps->sendTime = 1; if (cps->offeredDraw) cps->offeredDraw--; - /* currentMoveString is set as a side-effect of ParseOneMove */ - safeStrCpy(machineMove, currentMoveString, sizeof(machineMove)/sizeof(machineMove[0])); - strcat(machineMove, "\n"); - safeStrCpy(moveList[forwardMostMove], machineMove, sizeof(moveList[forwardMostMove])/sizeof(moveList[forwardMostMove][0])); - /* [AS] Save move info*/ pvInfoList[ forwardMostMove ].score = programStats.score; pvInfoList[ forwardMostMove ].depth = programStats.depth; @@ -9930,8 +9925,6 @@ LoadGameOneMove(readAhead) return FALSE; } else { /* currentMoveString is set as a side-effect of yylex */ - strcat(currentMoveString, "\n"); - safeStrCpy(moveList[forwardMostMove], currentMoveString, sizeof(moveList[forwardMostMove])/sizeof(moveList[forwardMostMove][0])); thinkOutput[0] = NULLCHAR; MakeMove(fromX, fromY, toX, toY, promoChar);