Browse Source

Change enum to enum class

master
leo 3 years ago
parent
commit
1ac6fcacbd
  1. 6
      src/Ware/Ware.cpp
  2. 2
      src/Ware/Ware.h

6
src/Ware/Ware.cpp

@ -9,11 +9,11 @@ Ware::Ware(std::string name, bool hasCooling, double width, double height) {
this->size = { width, height }; this->size = { width, height };
if(hasCooling) { if(hasCooling) {
this->type = CoolingWare;
this->type = WareType::CoolingWare;
} else if(isLargeWare(this->size)) { } else if(isLargeWare(this->size)) {
this->type = LargeWare;
this->type = WareType::LargeWare;
} else { } else {
this->type = DefaultWare;
this->type = WareType::DefaultWare;
} }
count++; count++;
this->id = this->generateId(); this->id = this->generateId();

2
src/Ware/Ware.h

@ -7,7 +7,7 @@ class Ware {
double height; double height;
}; };
enum WareType {
enum class WareType {
DefaultWare, DefaultWare,
CoolingWare, CoolingWare,
LargeWare LargeWare

Loading…
Cancel
Save