Exemple #1
0
int	check_case(char *format, t_args *tab, va_list ap, int *cmp)
{
  int	i;

  i = 0;
  if (check_after(format, tab, cmp) == 2)
    return (0);
  if (*(format + 1) == 'c')
    {
      my_putchar((char)va_arg(ap, int));
      *cmp = *cmp + 1;
    }
Exemple #2
0
void action_result::execute()
{
	is_execution_ = true;
	init_for_execution();
	check_before();
	if (is_success()){
		try {
			do_execute();
		} catch (return_to_play_side_exception&) {
			if (!is_ok()) { DBG_AI_ACTIONS << "Return value of AI ACTION was not checked." << std::endl; } //Demotes to DBG "unchecked result" warning
			throw;
		}
	}
	if (is_success()){
		check_after();
	}
	is_execution_ = false;
}
void action_result::execute()
{
	is_execution_ = true;
	init_for_execution();
	check_before();
	if (is_success()){
		do_execute();
		try {
			resources::controller->check_victory();
		} catch (...) {
			is_ok(); //Silences "unchecked result" warning
			throw;
		}
	}
	if (is_success()){
		check_after();
	}
	is_execution_ = false;
}