delete condition to add operation in t_stacks

This commit is contained in:
2026-01-08 13:59:09 +00:00
parent 2ba9029955
commit bb39e7d0ec
4 changed files with 26 additions and 48 deletions

View File

@@ -6,7 +6,7 @@
/* By: mteriier <mteriier@student.42lyon.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/08 15:09:40 by mteriier #+# #+# */
/* Updated: 2026/01/08 13:52:01 by dgaillet ### ########lyon.fr */
/* Updated: 2026/01/08 13:57:56 by dgaillet ### ########lyon.fr */
/* */
/* ************************************************************************** */
@@ -30,10 +30,8 @@ void pa(t_stacks *stacks)
stacks->b = stacks->b->next;
}
stack_add_front(&(stacks->a), b_push);
if (stacks->bench)
stacks->pa++;
else
write(1, "pa\n", 3);
stacks->pa++;
write(1, "pa\n", 3);
}
void pb(t_stacks *stacks)
@@ -52,8 +50,6 @@ void pb(t_stacks *stacks)
stacks->a = stacks->a->next;
}
stack_add_front(&(stacks->b), a_push);
if (stacks->bench)
stacks->pb++;
else
write(1, "pb\n", 3);
stacks->pb++;
write(1, "pb\n", 3);
}