From 84a641b8bb849a1951c60f92dc97619237fb2d09 Mon Sep 17 00:00:00 2001 From: gguliash Date: Sun, 30 Aug 2015 19:53:07 +0100 Subject: [PATCH] A small code simplification No functional change Resolves #411 --- src/bitboard.cpp | 5 +---- src/search.cpp | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/bitboard.cpp b/src/bitboard.cpp index e0533bc9..7a4d73c9 100644 --- a/src/bitboard.cpp +++ b/src/bitboard.cpp @@ -18,7 +18,6 @@ */ #include -#include // For std::memset #include "bitboard.h" #include "bitcount.h" @@ -247,9 +246,7 @@ namespace { { 728, 10316, 55013, 32803, 12281, 15100, 16645, 255 } }; Bitboard occupancy[4096], reference[4096], edges, b; - int age[4096], current = 0, i, size; - - std::memset(age, 0, sizeof(age)); + int age[4096] = {0}, current = 0, i, size; // attacks[s] is a pointer to the beginning of the attacks table for square 's' attacks[SQ_A1] = table; diff --git a/src/search.cpp b/src/search.cpp index d8101e55..8037e6e7 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -341,7 +341,7 @@ namespace { Move easyMove = EasyMove.get(pos.key()); EasyMove.clear(); - std::memset(ss-2, 0, 5 * sizeof(Stack)); + std::memset(stack, 0, 5 * sizeof(Stack)); depth = DEPTH_ZERO; BestMoveChanges = 0; -- 2.39.2