static bool write_header(std::ostream& stream, std::uint32_t hashValue, const std::string& desc) {
write_little_endian<std::uint32_t>(stream, Version);
write_little_endian<std::uint32_t>(stream, hashValue);
- write_little_endian<std::uint32_t>(stream, (std::uint32_t) desc.size());
+ write_little_endian<std::uint32_t>(stream, std::uint32_t(desc.size()));
stream.write(&desc[0], desc.size());
return !stream.fail();
}
constexpr std::string_view PieceToChar(" PNBRQK pnbrqk");
-// format_cp_compact() converts a Value into (centi)pawns and writes it in a buffer.
+// Converts a Value into (centi)pawns and writes it in a buffer.
// The buffer must have capacity for at least 5 chars.
static void format_cp_compact(Value v, char* buffer) {
}
-// format_cp_aligned_dot() converts a Value into pawns, always keeping two decimals
+// Converts a Value into pawns, always keeping two decimals
static void format_cp_aligned_dot(Value v, std::stringstream& stream) {
const double pawns = std::abs(0.01 * UCI::to_cp(v));
}
-// trace() returns a string with the value of each piece on a board,
+// Returns a string with the value of each piece on a board,
// and a table for (PSQT, Layers) values bucket by bucket.
std::string trace(Position& pos) {