Skip to content

Commit

Permalink
Merge pull request #190 from notx0r/fix_int
Browse files Browse the repository at this point in the history
Replaces std::size_t with int in for loops to prevent errors
  • Loading branch information
bupticybee authored Feb 19, 2024
2 parents f5bb8c0 + 78f2ed2 commit b6775e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/solver/BestResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ BestResponse::showdownBestResponse(shared_ptr<ShowdownNode> node, int player,con
vector<float> card_winsum(52);
for(std::size_t i = 0;i < card_winsum.size();i ++) card_winsum[i] = 0;

std::size_t j = 0;
int j = 0;
//if(player_combs.length != oppo_combs.length) throw new RuntimeException("");

for(std::size_t i = 0;i < player_combs.size();i ++){
Expand Down
2 changes: 1 addition & 1 deletion src/solver/PCfrSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ PCfrSolver::showdownUtility(int player, shared_ptr<ShowdownNode> node, const vec
vector<float> card_winsum = vector<float> (52);//node->card_sum;
fill(card_winsum.begin(),card_winsum.end(),0);

std::size_t j = 0;
int j = 0;
for(std::size_t i = 0;i < player_combs.size();i ++){
const RiverCombs& one_player_comb = player_combs[i];
while (j < oppo_combs.size() && one_player_comb.rank < oppo_combs[j].rank){
Expand Down

0 comments on commit b6775e5

Please sign in to comment.