Skip to content

Commit

Permalink
fix build for gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
rask24 committed Feb 9, 2024
1 parent 30afe94 commit 2d35ab9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/sort/set_opt_method.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: reasuke <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/09 10:23:28 by reasuke #+# #+# */
/* Updated: 2024/02/09 23:40:17 by reasuke ### ########.fr */
/* Updated: 2024/02/10 00:03:36 by reasuke ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -78,6 +78,7 @@ static void _set_is_opt(t_stack **p_b)
i = 0;
st_b = *p_b;
opt_cost = INT_MAX;
min_index = -1;
while (i < size_b)
{
if (ft_chmin(&opt_cost, get_content(st_b)->min_cost))
Expand All @@ -87,11 +88,8 @@ static void _set_is_opt(t_stack **p_b)
}
i = 0;
st_b = *p_b;
while (i < min_index)
{
while (i++ < min_index)
st_b = st_b->next;
i++;
}
get_content(st_b)->is_opt = true;
}

Expand Down

0 comments on commit 2d35ab9

Please sign in to comment.