]> git.sesse.net Git - stockfish/commitdiff
A small code simplification
authorgguliash <gguliash@cisco.com>
Sun, 30 Aug 2015 18:53:07 +0000 (19:53 +0100)
committerJoona Kiiski <joona.kiiski@gmail.com>
Sun, 30 Aug 2015 18:58:32 +0000 (19:58 +0100)
No functional change

Resolves #411

src/bitboard.cpp
src/search.cpp

index e0533bc9cc286280c61432c455adf41ee3695ebe..7a4d73c9cb6b2adbbbd8204777327d5311201375 100644 (file)
@@ -18,7 +18,6 @@
 */
 
 #include <algorithm>
 */
 
 #include <algorithm>
-#include <cstring>   // For std::memset
 
 #include "bitboard.h"
 #include "bitcount.h"
 
 #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;
                              {  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;
 
     // attacks[s] is a pointer to the beginning of the attacks table for square 's'
     attacks[SQ_A1] = table;
index d8101e552f23807342a6b55ee7847fc8934405fe..8037e6e74f29300065618b16a435e29201a9488e 100644 (file)
@@ -341,7 +341,7 @@ namespace {
     Move easyMove = EasyMove.get(pos.key());
     EasyMove.clear();
 
     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;
 
     depth = DEPTH_ZERO;
     BestMoveChanges = 0;