]> git.sesse.net Git - stockfish/blobdiff - src/tt.h
Retire update_killers()
[stockfish] / src / tt.h
index 94ee78e70f233f9126bee035e1213403551bee8f..5ca5c237d82f7ec38974b56944b267c5c688a76b 100644 (file)
--- a/src/tt.h
+++ b/src/tt.h
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #if !defined(TT_H_INCLUDED)
 #define TT_H_INCLUDED
 
 #include <iostream>
 
-#include "depth.h"
 #include "move.h"
-#include "value.h"
-
-
-////
-//// Types
-////
-
+#include "types.h"
 
 /// A simple fixed size hash table used to store pawns and material
 /// configurations. It is basically just an array of Entry objects.
@@ -46,7 +38,7 @@ class SimpleHash {
 public:
   SimpleHash() {
 
-    entries = new Entry[HashSize];
+    entries = new (std::nothrow) Entry[HashSize];
     if (!entries)
     {
         std::cerr << "Failed to allocate " << HashSize * sizeof(Entry)
@@ -56,7 +48,7 @@ public:
     memset(entries, 0, HashSize * sizeof(Entry));
   }
 
-  ~SimpleHash() { delete [] entries; }
+  virtual ~SimpleHash() { delete [] entries; }
 
   Entry* find(Key key) const { return entries + ((uint32_t)key & (HashSize - 1)); }