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.

No functional change
  • Loading branch information
vondele authored and PikaCat-OuO committed Mar 30, 2024
1 parent fba3189 commit ab8c900
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/uci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,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 = 10 * pos.count<ROOK>() + 5 * pos.count<KNIGHT>() + 5 * pos.count<CANNON>()
+ 3 * pos.count<BISHOP>() + 2 * pos.count<ADVISOR>() + pos.count<PAWN>();
Expand Down

0 comments on commit ab8c900

Please sign in to comment.