Skip to content

Commit

Permalink
Uniform engine_info
Browse files Browse the repository at this point in the history
  • Loading branch information
Joachim26 authored Feb 25, 2024
1 parent 917007a commit 86dce21
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,13 @@ class Logger {
// Stockfish version
std::string engine_info(bool to_uci) {
std::stringstream ss;
ss << "SFnps_" << version << std::setfill('0');

if constexpr (version != "dev")
ss << "SFnps" << version << std::setfill('0');

if constexpr (version == "dev")
{
ss << "_";
ss << "SFnps" << std::setfill('0');
#ifdef GIT_DATE
ss << stringify(GIT_DATE);
#else
Expand All @@ -175,14 +177,6 @@ std::string engine_info(bool to_uci) {
ss << year << std::setw(2) << std::setfill('0') << (1 + months.find(month) / 4)
<< std::setw(2) << std::setfill('0') << day;
#endif

//ss << "_";

#ifdef GIT_SHA
//ss << stringify(GIT_SHA);
#else
//ss << "nogit";
#endif
}

ss << (to_uci ? "\nid author " : " by ") << "the Stockfish developers (see AUTHORS file)";
Expand Down

0 comments on commit 86dce21

Please sign in to comment.