From d4f4e47cafbaf1a58a0622d4d66d703c2a4c71cc Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Wed, 18 Apr 2012 08:29:23 +0200 Subject: [PATCH] Improve HashTable initialization --- src/game.cpp | 4 ++-- src/hashtable.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index d22c4fd..ce43987 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -23,8 +23,8 @@ Game::Game() { nodes_count = 0; output_thinking = false; - tt.clear(); - material_table.clear(); + //tt.clear(); + //material_table.clear(); clear_killers(); search_moves.clear(); diff --git a/src/hashtable.h b/src/hashtable.h index f237fee..57d614f 100644 --- a/src/hashtable.h +++ b/src/hashtable.h @@ -31,6 +31,8 @@ class HashTable struct Entry { Hash hash; T value; + + Entry() : hash(0), value() {} }; Entry* entries; -- 2.11.4.GIT