]> git.sesse.net Git - stockfish/blobdiff - src/misc.h
Rename time variable to reflect UCI parameters
[stockfish] / src / misc.h
index d7addd845351f2a5f03fc9552ea6255c17bcb314..970f335d1b74f5f2bad89fe782a6479ab26b69d3 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef MISC_H_INCLUDED
 #define MISC_H_INCLUDED
 
-#include <fstream>
+#include <ostream>
 #include <string>
 #include <vector>
 
@@ -37,12 +37,6 @@ extern void dbg_mean_of(int v);
 extern void dbg_print();
 
 
-struct Log : public std::ofstream {
-  Log(const std::string& f = "log.txt") : std::ofstream(f.c_str(), std::ios::out | std::ios::app) {}
- ~Log() { if (is_open()) close(); }
-};
-
-
 namespace Time {
   typedef int64_t point;
   inline point now() { return system_time_to_msec(); }
@@ -51,18 +45,18 @@ namespace Time {
 
 template<class Entry, int Size>
 struct HashTable {
-  HashTable() : e(Size, Entry()) {}
-  Entry* operator[](Key k) { return &e[(uint32_t)k & (Size - 1)]; }
+  HashTable() : table(Size, Entry()) {}
+  Entry* operator[](Key k) { return &table[(uint32_t)k & (Size - 1)]; }
 
 private:
-  std::vector<Entry> e;
+  std::vector<Entry> table;
 };
 
 
-enum SyncCout { io_lock, io_unlock };
+enum SyncCout { IO_LOCK, IO_UNLOCK };
 std::ostream& operator<<(std::ostream&, SyncCout);
 
-#define sync_cout std::cout << io_lock
-#define sync_endl std::endl << io_unlock
+#define sync_cout std::cout << IO_LOCK
+#define sync_endl std::endl << IO_UNLOCK
 
 #endif // #ifndef MISC_H_INCLUDED