Skip to content

Commit

Permalink
Avoid a note related to an ABI change
Browse files Browse the repository at this point in the history
current master triggers a gcc note:
parameter passing for argument of type 'std::pair<double, double>' when C++17 is enabled changed to match C++14 in GCC 10.1

while this is inconsequential, and just informative  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111516 we can easily avoid it.

closes #5145

No functional change
  • Loading branch information
vondele committed Mar 30, 2024
1 parent ec598b3 commit c964942
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/uci.cpp
Expand Up @@ -344,7 +344,13 @@ void UCI::position(Position& pos, std::istringstream& is, StateListPtr& states)
}

namespace {
std::pair<double, double> win_rate_params(const Position& pos) {

struct WinRateParams {
double a;
double b;
};

WinRateParams win_rate_params(const Position& pos) {

int material = pos.count<PAWN>() + 3 * pos.count<KNIGHT>() + 3 * pos.count<BISHOP>()
+ 5 * pos.count<ROOK>() + 9 * pos.count<QUEEN>();
Expand Down

0 comments on commit c964942

Please sign in to comment.