Skip to content

Add semicolon missing from PR 223 (two-percent-solution)#224

Open
tameware with Copilot wants to merge 2 commits into
developfrom
copilot/fix-failing-github-actions-job-asan
Open

Add semicolon missing from PR 223 (two-percent-solution)#224
tameware with Copilot wants to merge 2 commits into
developfrom
copilot/fix-failing-github-actions-job-asan

Conversation

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

PR #223 ("Two percent solution") introduced a missing semicolon on the last assignment in make_3(), breaking compilation for all CI jobs (asan, tsan, build_and_test).

// Before (broken — missing semicolon on last line):
posPoint->winner[st].rank = thrp->rel[aggr].abs_rank[1][st].rank;
posPoint->winner[st].hand = thrp->rel[aggr].abs_rank[1][st].hand;
posPoint->second_best[st].rank = thrp->rel[aggr].abs_rank[2][st].rank;
posPoint->second_best[st].hand = thrp->rel[aggr].abs_rank[2][st].hand  // ← missing ;

// After (fixed):
posPoint->second_best[st].hand = thrp->rel[aggr].abs_rank[2][st].hand;

This PR applies the full set of PR #223's intended changes with the bug corrected:

  • ab_search.cpp — Remove static_cast<unsigned char>() wrappers from rank/hand assignments in make_3() and make_3_ctx(); fix indentation of the make_3() block to match make_3_ctx(); add the missing semicolon.
  • heuristic_sorting.cpp — Simplify chained casts (static_cast<int>(static_cast<unsigned char>(rel_rank[...][...]))) to direct indexing (rel_rank[tpos.aggr[suit]][mply[k].rank]); fix misaligned if/else if blocks; remove trailing whitespace.
  • quick_tricks.cpp — Remove redundant inner static_cast<unsigned char>() from two static_cast<int>(static_cast<unsigned char>(...)) patterns.

The ASAN CI job was failing because PR #223 (Two percent solution)
introduced a missing semicolon at the end of ab_search.cpp:884 in
the make_3() function:

  posPoint->second_best[st].hand = thrp->rel[aggr].abs_rank[2][st].hand
                                                                        ^
                                                                        missing ;

This commit applies all of PR #223's changes (removing unnecessary
static_cast<unsigned char>() wrappers and fixing indentation) with
the missing semicolon corrected.
Copilot AI changed the title [WIP] Fix the failing GitHub Actions job asan Fix missing semicolon in make_3() causing ASAN/all CI build failure Jul 3, 2026
Copilot AI requested a review from tameware July 3, 2026 13:16
@tameware tameware marked this pull request as ready for review July 3, 2026 13:18
@tameware tameware changed the title Fix missing semicolon in make_3() causing ASAN/all CI build failure Add semicolon missing from PR 223 (two-percent-solution) Jul 3, 2026

@tameware tameware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a compilation-breaking syntax error introduced in PR #223 and reapplies PR #223’s intended “two percent solution” cleanups: removing redundant casts and aligning formatting in a few hot-path solver routines.

Changes:

  • Fixes the missing semicolon in make_3() and aligns the winner/second-best assignment block formatting in ab_search.cpp.
  • Simplifies rel_rank indexing and cleans up indentation/whitespace in heuristic_sorting.cpp.
  • Removes redundant inner static_cast<unsigned char> usage when indexing bit_map_rank in quick_tricks.cpp.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
library/src/ab_search.cpp Fixes the make_3() compilation error and removes unnecessary casts in winner/second-best assignments.
library/src/heuristic_sorting/heuristic_sorting.cpp Simplifies rel_rank indexing and fixes indentation/whitespace in weighting helpers.
library/src/quick_tricks.cpp Removes redundant casts in bit_map_rank indexing for abs-rank lookups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants