X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmisc.cpp;h=bb3a641bca9ff0b858568245dd33dae9bf53a853;hp=78227ee282067d83acdbb72d0c67cb2b56256451;hb=7262fd5d14810b7b495b5038e348a448fda1bcc3;hpb=773dff020968f7a6f590cfd53e8fd89f12e15e36 diff --git a/src/misc.cpp b/src/misc.cpp index 78227ee2..bb3a641b 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -67,7 +67,7 @@ namespace { /// Version number. If Version is left empty, then compile date in the format /// DD-MM-YY and show in engine_info. -const string Version = "14"; +const string Version = "14.1"; /// Our fancy logging facility. The trick here is to replace cin.rdbuf() and /// cout.rdbuf() with two Tie objects that tie cin and cout to a file stream. We @@ -110,7 +110,14 @@ public: static Logger l; - if (!fname.empty() && !l.file.is_open()) + if (l.file.is_open()) + { + cout.rdbuf(l.out.buf); + cin.rdbuf(l.in.buf); + l.file.close(); + } + + if (!fname.empty()) { l.file.open(fname, ifstream::out); @@ -123,12 +130,6 @@ public: cin.rdbuf(&l.in); cout.rdbuf(&l.out); } - else if (fname.empty() && l.file.is_open()) - { - cout.rdbuf(l.out.buf); - cin.rdbuf(l.in.buf); - l.file.close(); - } } }; @@ -378,6 +379,7 @@ void std_aligned_free(void* ptr) { static void* aligned_large_pages_alloc_windows(size_t allocSize) { #if !defined(_WIN64) + (void)allocSize; // suppress unused-parameter compiler warning return nullptr; #else