1 file changed, +15, -10
7b07703refactor(parser.h): merge unsigned int members into a single array and define enum to access the array elements by name
author
mogi <git@mogiya.dev> on 01-07-2026 03:13 UTC+1
committer
mogi <git@mogiya.dev> on 01-07-2026 03:13 UTC+1
parentb066f8b
+15, -10
    @@ -6,24 +6,29 @@
 6 6 /*   By: mleitao <marvin@42.fr>                     +#+  +:+       +#+        */
 7 7 /*                                                +#+#+#+#+#+   +#+           */
 8 8 /*   Created: 2026/06/30 01:30:52 by mleitao           #+#    #+#             */
 9  -/*   Updated: 2026/06/30 01:45:46 by mleitao          ###   ########.fr       */
   9+/*   Updated: 2026/07/01 03:10:37 by mleitao          ###   ########.fr       */
1010 /*                                                                            */
1111 /* ************************************************************************** */
1212 
1313 #ifndef PARSER_H
1414 # define PARSER_H
1515 
  16+enum e_arg
  17+{
  18+	ARG_CODERS,
  19+	ARG_BURNOUT,
  20+	ARG_COMPILE,
  21+	ARG_DEBUG,
  22+	ARG_REFACTOR,
  23+	ARG_COMPILES_REQUIRED,
  24+	ARG_COOLDOWN
  25+};
  26+
1627 typedef struct s_args
1728 {
18  -	int		number_of_coders;
19  -	int		time_to_burnout;
20  -	int		time_to_compile;
21  -	int		time_to_debug;
22  -	int		time_to_refactor;
23  -	int		number_of_compiles_required;
24  -	int		dongle_cooldown;
25  -	char	scheduler;
26  -}			t_args;
  29+	unsigned int	args[7];
  30+	char			scheduler;
  31+}					t_args;
2732 
2833 int	parse_args(int argc, char **argv, t_args *args);
2934