1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 19:49:14 +00:00

gcc 7 port

Testing the release candidate revealed only one minor issue, namely a new warning -Wimplicit-fallthrough (part of -Wextra) triggers in the movepicker. This can be silenced by adding a comment, and once we move to c++17 by adding a standard annotation [[fallthrough]];.

No functional change.

Closes #1090
This commit is contained in:
Joost VandeVondele 2017-04-28 17:30:14 +02:00 committed by Joona Kiiski
parent a18c2c2c3f
commit e9f26cccdd

View file

@ -196,6 +196,7 @@ Move MovePicker::next_move(bool skipQuiets) {
endMoves = generate<CAPTURES>(pos, cur);
score<CAPTURES>();
++stage;
/* fallthrough */
case GOOD_CAPTURES:
while (cur < endMoves)
@ -218,6 +219,7 @@ Move MovePicker::next_move(bool skipQuiets) {
&& pos.pseudo_legal(move)
&& !pos.capture(move))
return move;
/* fallthrough */
case KILLERS:
++stage;
@ -227,6 +229,7 @@ Move MovePicker::next_move(bool skipQuiets) {
&& pos.pseudo_legal(move)
&& !pos.capture(move))
return move;
/* fallthrough */
case COUNTERMOVE:
++stage;
@ -238,6 +241,7 @@ Move MovePicker::next_move(bool skipQuiets) {
&& pos.pseudo_legal(move)
&& !pos.capture(move))
return move;
/* fallthrough */
case QUIET_INIT:
cur = endBadCaptures;
@ -245,6 +249,7 @@ Move MovePicker::next_move(bool skipQuiets) {
score<QUIETS>();
partial_insertion_sort(cur, endMoves, -4000 * depth / ONE_PLY);
++stage;
/* fallthrough */
case QUIET:
while ( cur < endMoves
@ -260,6 +265,7 @@ Move MovePicker::next_move(bool skipQuiets) {
}
++stage;
cur = moves; // Point to beginning of bad captures
/* fallthrough */
case BAD_CAPTURES:
if (cur < endBadCaptures)
@ -271,6 +277,7 @@ Move MovePicker::next_move(bool skipQuiets) {
endMoves = generate<EVASIONS>(pos, cur);
score<EVASIONS>();
++stage;
/* fallthrough */
case ALL_EVASIONS:
while (cur < endMoves)
@ -286,6 +293,7 @@ Move MovePicker::next_move(bool skipQuiets) {
endMoves = generate<CAPTURES>(pos, cur);
score<CAPTURES>();
++stage;
/* fallthrough */
case PROBCUT_CAPTURES:
while (cur < endMoves)
@ -302,6 +310,7 @@ Move MovePicker::next_move(bool skipQuiets) {
endMoves = generate<CAPTURES>(pos, cur);
score<CAPTURES>();
++stage;
/* fallthrough */
case QCAPTURES_1: case QCAPTURES_2:
while (cur < endMoves)
@ -315,6 +324,7 @@ Move MovePicker::next_move(bool skipQuiets) {
cur = moves;
endMoves = generate<QUIET_CHECKS>(pos, cur);
++stage;
/* fallthrough */
case QCHECKS:
while (cur < endMoves)
@ -330,6 +340,7 @@ Move MovePicker::next_move(bool skipQuiets) {
endMoves = generate<CAPTURES>(pos, cur);
score<CAPTURES>();
++stage;
/* fallthrough */
case QRECAPTURES:
while (cur < endMoves)