mirror of
https://gitlab.com/klmp200/LO41.git
synced 2024-11-22 00:33:22 +00:00
C'est quand même mieux de vérifier si ça compile avant de push
This commit is contained in:
parent
beca5698b4
commit
74194d46cb
@ -122,6 +122,8 @@ int get_inside_elevator_Building(THIS(Building), int current_floor, Passenger pa
|
|||||||
for (i=0; i<ELEVATOR_NB; i++){
|
for (i=0; i<ELEVATOR_NB; i++){
|
||||||
if (this->elevators[i]->get_floor(this->elevators[i]) == current_floor &&
|
if (this->elevators[i]->get_floor(this->elevators[i]) == current_floor &&
|
||||||
this->elevators[i]->get_state(this->elevators[i]) == waiting){
|
this->elevators[i]->get_state(this->elevators[i]) == waiting){
|
||||||
|
/* pour faire taire le compilateur le temps que je revienne sur cette fonction */
|
||||||
|
printf("visiteur %s, de type %d\n", passenger.visitor->name, type);
|
||||||
/* Il faut faire des trucs ici */
|
/* Il faut faire des trucs ici */
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
SYNCHRONIZED_GETTER(Elevator, ELEVATOR_STATE, state)
|
SYNCHRONIZED_GETTER(Elevator, ELEVATOR_STATE, state)
|
||||||
SYNCHRONIZED_SETTER(Elevator, ELEVATOR_STATE, state)
|
SYNCHRONIZED_SETTER(Elevator, ELEVATOR_STATE, state)
|
||||||
SYNCHRONIZED_GETTER(Elevator, ELEVATOR_STATE, floor)
|
SYNCHRONIZED_GETTER(Elevator, int, floor)
|
||||||
SYNCHRONIZED_SETTER(Elevator, ELEVATOR_STATE, floor)
|
SYNCHRONIZED_SETTER(Elevator, int, floor)
|
||||||
|
|
||||||
void _free__Elevator(THIS(Elevator)){
|
void _free__Elevator(THIS(Elevator)){
|
||||||
DELETE(this->passenger_ids);
|
DELETE(this->passenger_ids);
|
||||||
|
@ -25,7 +25,7 @@ typedef struct o_Elevator {
|
|||||||
PUBLIC void * (*runnable)(void * void_this);
|
PUBLIC void * (*runnable)(void * void_this);
|
||||||
|
|
||||||
SYNCHRONIZE PRIVATE void (*set_state)(_THIS(Elevator), ELEVATOR_STATE var);
|
SYNCHRONIZE PRIVATE void (*set_state)(_THIS(Elevator), ELEVATOR_STATE var);
|
||||||
SYNCHRONIZE PRIVATE int (*set_floor)(_THIS(Elevator));
|
SYNCHRONIZE PRIVATE void (*set_floor)(_THIS(Elevator), int var);
|
||||||
|
|
||||||
SYNCHRONIZE PUBLIC void (*repair)(_THIS(Elevator));
|
SYNCHRONIZE PUBLIC void (*repair)(_THIS(Elevator));
|
||||||
SYNCHRONIZE PUBLIC int (*get_number_of_passengers)(_THIS(Elevator));
|
SYNCHRONIZE PUBLIC int (*get_number_of_passengers)(_THIS(Elevator));
|
||||||
|
Loading…
Reference in New Issue
Block a user