Skip to content

Commit

Permalink
A small code simplification
Browse files Browse the repository at this point in the history
No functional change

Resolves official-stockfish#411
  • Loading branch information
gguliash authored and zamar committed Aug 30, 2015
1 parent 7f300a7 commit 84a641b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/bitboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/

#include <algorithm>
#include <cstring> // For std::memset

#include "bitboard.h"
#include "bitcount.h"
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 84a641b

Please sign in to comment.