dwarfvet - initialize spot_index (#1711), fix types in Patient

develop
Quietust 2020-11-17 09:11:55 -06:00
parent ddbd22fcf4
commit 877fd42214
1 changed files with 6 additions and 5 deletions

@ -72,21 +72,22 @@ struct hospital_spot {
class Patient { class Patient {
public: public:
// Constructor/Deconstrctor // Constructor/Deconstrctor
Patient(int32_t id, int spot_index, int32_t x, int32_t y, int32_t z); Patient(int32_t id, size_t spot_index, int32_t x, int32_t y, int32_t z);
int32_t getID() { return this->id; }; int32_t getID() { return this->id; };
int32_t getSpotIndex() { return this->spot_index; }; size_t getSpotIndex() { return this->spot_index; };
int32_t returnX() { return this->spot_in_hospital.x; }; int32_t returnX() { return this->spot_in_hospital.x; };
int32_t returnY() { return this->spot_in_hospital.y; }; int32_t returnY() { return this->spot_in_hospital.y; };
int32_t returnZ() { return this->spot_in_hospital.z; }; int32_t returnZ() { return this->spot_in_hospital.z; };
private: private:
struct hospital_spot spot_in_hospital; struct hospital_spot spot_in_hospital;
int id; int32_t id;
int spot_index; size_t spot_index;
}; };
Patient::Patient(int32_t id, int32_t spot_index, int32_t x, int32_t y, int32_t z){ Patient::Patient(int32_t id, size_t spot_index, int32_t x, int32_t y, int32_t z){
this->id = id; this->id = id;
this->spot_index = spot_index;
this->spot_in_hospital.x = x; this->spot_in_hospital.x = x;
this->spot_in_hospital.y = y; this->spot_in_hospital.y = y;
this->spot_in_hospital.z = z; this->spot_in_hospital.z = z;