mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 11:36:51 +08:00
Be sure book file is closed before we leave
Move closing of file in Book destructor. This guarantees us against leaving the file open under any case and simplifies also Book use. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -53,8 +53,8 @@ struct BookEntry {
|
||||
};
|
||||
|
||||
class Book : private std::ifstream {
|
||||
|
||||
public:
|
||||
~Book();
|
||||
void open(const std::string& fName);
|
||||
void close();
|
||||
const std::string file_name() const;
|
||||
|
||||
Reference in New Issue
Block a user