Summary
Refactor code for pointer declarations
- Replaced the implicit char(c) conversion with static_cast<char>(c) in the overflow and log methods to make the type conversion explicit.
- Split the joint declaration of std::streambuf pointers into two separate lines, maintaining consistent pointer style throughout the file.
Replace include guards with #pragma once
- Streamlined header usage by removing manual include guards and adding
#pragma once in core engine headers such as types.h, simplifying compilation and guarding against duplicate inclusions - Applied the same
#pragma once refactor across NNUE evaluation headers to ensure consistent protection for neural-network components - Updated auxiliary headers, including the polyglot book interface and sparsehash utilities, to use
#pragma once, maintaining cross-module consistency
Replace macros with inline constants
- Replaced the
EvalFileDefaultNameBig/Small macros with inline constexpr std::string_view constants to provide named defaults in a type-safe way - Updated engine initialization and options to reference the new constants, ensuring network loading uses
Eval::EvalFileDefaultNameBig and Eval::EvalFileDefaultNameSmall values directly - Embedded NNUE network files now rely on literal names with compile-time assertions to match the new constants, and a comment clarifies default-name handling via constants
Download revolution v.2.21 dev-110925