Skip to content

Commit 9a45233

Browse files
committed
fix(docs): Doxygen warnings
1 parent 64eab05 commit 9a45233

File tree

5 files changed

+12
-103
lines changed

5 files changed

+12
-103
lines changed

docs/CMakeLists.txt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,6 @@ set (DOXYGEN_STRIP_FROM_INC_PATH
3232
"${BenBot_SOURCE_DIR}/ben-bot/include" "${BenBot_SOURCE_DIR}/ben-bot/resources/include"
3333
)
3434

35-
# generate the engine docs page
36-
37-
set (engine_doc_page "${CMAKE_CURRENT_BINARY_DIR}/engine_docs.txt")
38-
39-
# all files must exist at configure time when using doxygen_add_docs()'s stamp file option
40-
file (TOUCH "${engine_doc_page}")
41-
42-
set (generator_script "${CMAKE_CURRENT_LIST_DIR}/GenerateEngineDocs.cmake")
43-
44-
add_custom_command (
45-
OUTPUT "${engine_doc_page}"
46-
COMMAND "${CMAKE_COMMAND}" -D "OUTPUT_FILE=${engine_doc_page}" -D
47-
"ENGINE_PATH=$<TARGET_FILE:ben_bot::ben_bot>" -P "${generator_script}"
48-
DEPENDS ben_bot::ben_bot "${generator_script}" "${CMAKE_CURRENT_LIST_DIR}/engine-docs.txt"
49-
COMMENT "Generating engine docs page..."
50-
VERBATIM USES_TERMINAL
51-
)
52-
5335
#
5436

5537
get_target_property (libutil_headers ben_bot::libutil HEADER_SET)
@@ -64,7 +46,6 @@ doxygen_add_docs (
6446
"${CMAKE_CURRENT_LIST_DIR}/uci-spec.txt"
6547
"${CMAKE_CURRENT_LIST_DIR}/top-level-groups.txt"
6648
"${CMAKE_CURRENT_LIST_DIR}/CodeStyle.md"
67-
"${engine_doc_page}"
6849
${libutil_headers}
6950
${libchess_headers}
7051
${libbenbot_headers}

docs/GenerateEngineDocs.cmake

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/engine-docs.txt

Lines changed: 0 additions & 22 deletions
This file was deleted.

libbenbot/include/libbenbot/engine/Engine.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class [[nodiscard]] Engine final : public uci::EngineBase {
9898

9999
void print_logo_and_version() const;
100100
void print_help(string_view args) const;
101-
void print_options(string_view args) const;
101+
void print_options() const;
102102
void print_current_position(string_view arguments) const;
103103

104104
void set_pretty_printing(bool shouldPrettyPrint);
@@ -204,9 +204,9 @@ class [[nodiscard]] Engine final : public uci::EngineBase {
204204
},
205205
CustomCommand {
206206
.name = "options",
207-
.action = [this](const string_view args){ print_options(args); },
207+
.action = [this](const string_view args){ print_options(); },
208208
.description = "Dump current UCI option values",
209-
.argsHelp = "[--no-current]"
209+
.argsHelp = {}
210210
},
211211
CustomCommand {
212212
.name = "perft",

libbenbot/src/engine/Printing.cpp

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,8 @@ void Engine::print_help(const string_view args) const
7979
print_colored_table(table);
8080
}
8181

82-
void Engine::print_options(const string_view args) const
82+
void Engine::print_options() const
8383
{
84-
const bool noCurrent = [args] {
85-
if (args.empty())
86-
return false;
87-
88-
return trim(args) == "--no-current";
89-
}();
90-
9184
println("");
9285
println("The following UCI options are supported:");
9386
println("");
@@ -97,10 +90,8 @@ void Engine::print_options(const string_view args) const
9790
table.append_column("Option")
9891
.append_column("Type")
9992
.append_column("Notes")
100-
.append_column("Default");
101-
102-
if (not noCurrent)
103-
table.append_column("Current");
93+
.append_column("Default")
94+
.append_column("Current");
10495

10596
for (const auto* option : options) {
10697
table.new_row()
@@ -115,22 +106,18 @@ void Engine::print_options(const string_view args) const
115106
},
116107
option->get_default_value_variant());
117108

118-
if (not noCurrent) {
119-
std::visit(
120-
[&table](auto value) {
121-
table.append_column(std::format("{}", value));
122-
},
123-
option->get_value_variant());
124-
}
109+
std::visit(
110+
[&table](auto value) {
111+
table.append_column(std::format("{}", value));
112+
},
113+
option->get_value_variant());
125114
}
126115
}
127116

128117
print_colored_table(table);
129118

130119
println("");
131-
132-
if (not noCurrent)
133-
println("Debug mode: {}", debugMode.load());
120+
println("Debug mode: {}", debugMode.load());
134121
}
135122

136123
void Engine::print_current_position(const string_view arguments) const

0 commit comments

Comments
 (0)