mirror of
https://gitlab.com/klmp200/LO41.git
synced 2025-07-11 20:29:24 +00:00
GCC YOU FAGGOT !
This commit is contained in:
@ -150,18 +150,18 @@ void go_to_floor_Building(THIS(Building), int origin, int destination, Passenger
|
||||
|
||||
pthread_cond_wait(this->condition_floors[origin], this->mutex_get_inside_elevator);
|
||||
elevator_number = this->get_inside_elevator(this, origin, passenger, type);
|
||||
if (type == resident)
|
||||
if (type == RESIDENT)
|
||||
printf("Le résident %s rentre dans l'ascenseur %s depuis l'étage %d\n", passenger.resident->name,
|
||||
this->elevators[elevator_number]->name, origin);
|
||||
else if (type == visitor)
|
||||
else if (type == VISITOR)
|
||||
printf("Le visiteur %s rentre dans l'ascenseur %s depuis l'étage %d\n", passenger.visitor->name,
|
||||
this->elevators[elevator_number]->name, origin);
|
||||
|
||||
pthread_cond_wait(this->condition_floors[destination], this->mutex_get_outside_elevator);
|
||||
if (type == resident)
|
||||
if (type == RESIDENT)
|
||||
printf("Le résident %s sors de l'ascenseur %s à l'étage %d\n", passenger.resident->name,
|
||||
this->elevators[elevator_number]->name, destination);
|
||||
else if (type == visitor)
|
||||
else if (type == VISITOR)
|
||||
printf("Le visiteur %s sors de l'ascenseur %s à l'étage %d\n", passenger.visitor->name,
|
||||
this->elevators[elevator_number]->name, destination);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "../Resident/Resident.h"
|
||||
#include "../Visitor/Visitor.h"
|
||||
|
||||
typedef enum {resident, visitor} PASSENGER_TYPE;
|
||||
typedef enum {RESIDENT, VISITOR} PASSENGER_TYPE;
|
||||
|
||||
typedef union u_Passenger {
|
||||
Resident * resident;
|
||||
|
Reference in New Issue
Block a user