File tree Expand file tree Collapse file tree 7 files changed +17
-7
lines changed
Expand file tree Collapse file tree 7 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ class [[nodiscard]] Engine final : public uci::EngineBase {
204204 },
205205 CustomCommand {
206206 .name = " options" ,
207- .action = [this ]( const string_view args) { print_options (); },
207+ .action = CustomCommand::void_cb ( [this ]{ print_options (); }) ,
208208 .description = " Dump current UCI option values" ,
209209 .argsHelp = {}
210210 },
Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ struct Context final {
5454 Context (Context&&) = delete ;
5555 Context& operator =(Context&&) = delete ;
5656
57+ ~Context () = default ;
58+
5759 /* * Performs a search.
5860 Results will be propagated via the ``callbacks`` that have been
5961 assigned.
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ struct Options final {
6969 */
7070 chess::moves::MoveList movesToSearch;
7171
72- /* * If true, the search should not exit until a ``xtop `` or ``exit``
72+ /* * If true, the search should not exit until a ``stop `` or ``exit``
7373 command is received.
7474 */
7575 bool infinite { false };
Original file line number Diff line number Diff line change @@ -88,6 +88,8 @@ namespace {
8888 BenchSearcherThread (BenchSearcherThread&&) = delete ;
8989 BenchSearcherThread& operator =(BenchSearcherThread&&) = delete ;
9090
91+ ~BenchSearcherThread () = default ;
92+
9193 [[nodiscard]] auto finished () const noexcept -> bool { return not thread.context .in_progress (); }
9294
9395 [[nodiscard]] auto get_result () const noexcept -> SearchResult
Original file line number Diff line number Diff line change @@ -43,12 +43,14 @@ namespace {
4343
4444void Engine::print_logo_and_version () const
4545{
46- const auto logoLines = get_at_most_n_lines<11uz>(resources::get_ascii_logo ());
46+ static constexpr auto NumLogoLines = 11uz;
47+
48+ const auto logoLines = get_at_most_n_lines<NumLogoLines>(resources::get_ascii_logo ());
4749
4850 cout << termcolor::grey << logoLines.front () << ' \n '
4951 << termcolor::blue;
5052
51- for (const auto line : logoLines | std::views::drop (1 ) | std::views::take (logoLines. capacity () - 2uz))
53+ for (const auto line : logoLines | std::views::drop (1 ) | std::views::take (NumLogoLines - 2uz))
5254 cout << line << ' \n ' ;
5355
5456 cout << termcolor::grey << logoLines.back () << " \n\n "
@@ -91,9 +93,11 @@ void print_colored_board(
9193{
9294 const auto boardStr = utf8 ? print_utf8 (pos) : print_ascii (pos);
9395
94- const auto lines = get_at_most_n_lines<9uz>(boardStr);
96+ static constexpr auto BoardLines = 9uz;
97+
98+ const auto lines = get_at_most_n_lines<BoardLines>(boardStr);
9599
96- for (const auto line : lines | std::views::take (lines. capacity () - 1uz)) {
100+ for (const auto line : lines | std::views::take (BoardLines - 1uz)) {
97101 cout << line.substr (0uz, line.length () - 1uz)
98102 << termcolor::white << line.back () << ' \n '
99103 << termcolor::reset;
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ namespace {
110110 {
111111 }
112112
113- AlphaBetaContext (const AlphaBetaContext&) = delete ;
113+ AlphaBetaContext (const AlphaBetaContext&) = default ;
114114 AlphaBetaContext& operator =(const AlphaBetaContext&) = delete ;
115115
116116 template <bool PVNode>
Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ struct Interrupter final {
6969 Interrupter (Interrupter&&) = delete ;
7070 Interrupter& operator =(Interrupter&&) = delete ;
7171
72+ ~Interrupter () = default ;
73+
7274 [[nodiscard]] auto get_search_duration () const noexcept -> milliseconds { return timer.get_duration (); }
7375
7476 // returns time remaining until abort time, or nullopt if there's no time bound
You can’t perform that action at this time.
0 commit comments