Assorted cleanups

- fix naming convention for `workingDirectory`
- use type alias for `EvalFiles` everywhere
- move `ponderMode` into `LimitsType`
- move limits parsing into standalone static function

closes https://github.com/official-stockfish/Stockfish/pull/5098

No functional change
This commit is contained in:
Disservin
2024-03-09 12:14:57 +01:00
parent 632f1c21cd
commit b6dfd6bd54
8 changed files with 26 additions and 33 deletions

View File

@@ -21,7 +21,6 @@
#include <iostream>
#include <string>
#include <unordered_map>
#include "evaluate.h"
#include "misc.h"
@@ -29,13 +28,10 @@
#include "thread.h"
#include "tt.h"
#include "ucioption.h"
#include "search.h"
namespace Stockfish {
namespace Eval::NNUE {
enum NetSize : int;
}
class Move;
enum Square : int;
using Value = int;
@@ -53,11 +49,12 @@ class UCI {
static std::string wdl(Value v, int ply);
static Move to_move(const Position& pos, std::string& str);
const std::string& workingDirectory() const { return cli.workingDirectory; }
static Search::LimitsType parse_limits(const Position& pos, std::istream& is);
OptionsMap options;
const std::string& working_directory() const { return cli.workingDirectory; }
std::unordered_map<Eval::NNUE::NetSize, Eval::EvalFile> evalFiles;
OptionsMap options;
Eval::NNUE::EvalFiles evalFiles;
private:
TranspositionTable tt;