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

@@ -30,7 +30,6 @@
#include <sstream>
#include <string_view>
#include <type_traits>
#include <unordered_map>
#include "../evaluate.h"
#include "../misc.h"
@@ -452,9 +451,9 @@ bool save_eval(std::ostream& stream,
}
// Save eval, to a file given by its name
bool save_eval(const std::optional<std::string>& filename,
NetSize netSize,
const std::unordered_map<Eval::NNUE::NetSize, Eval::EvalFile>& evalFiles) {
bool save_eval(const std::optional<std::string>& filename,
NetSize netSize,
const EvalFiles& evalFiles) {
std::string actualFilename;
std::string msg;

View File

@@ -26,8 +26,8 @@
#include <memory>
#include <optional>
#include <string>
#include <unordered_map>
#include "../evaluate.h"
#include "../misc.h"
#include "../types.h"
#include "nnue_architecture.h"
@@ -35,11 +35,6 @@
namespace Stockfish {
class Position;
namespace Eval {
struct EvalFile;
}
}
namespace Stockfish::Eval::NNUE {
@@ -87,9 +82,7 @@ bool save_eval(std::ostream& stream,
NetSize netSize,
const std::string& name,
const std::string& netDescription);
bool save_eval(const std::optional<std::string>& filename,
NetSize netSize,
const std::unordered_map<Eval::NNUE::NetSize, Eval::EvalFile>&);
bool save_eval(const std::optional<std::string>& filename, NetSize netSize, const EvalFiles&);
} // namespace Stockfish::Eval::NNUE