fix several bugs

master
IoTcat 5 years ago
parent 45ea8cd786
commit f309e42a34
  1. 3
      lib/ovo.h
  2. 2
      src/main.cpp
  3. 2
      src/park.cpp
  4. 2
      src/park.h

@ -714,6 +714,7 @@ namespace ovo{
if(indexList["_isExist"] == "NO"){
return o;
}
indexList.clear("_isExist");
if(indexList["__TABLE_INDEX__" + index] == "undefined"){
return o;
}
@ -741,6 +742,7 @@ namespace ovo{
if(indexList["_isExist"] == "NO"){
return o;
}
indexList.clear("_isExist");
d.forEach([&](string index, string val){
@ -763,6 +765,7 @@ namespace ovo{
return o;
}
indexList.clear("_isExist");
for(auto i : indexList){
o.push_back(this->getData(i.first));

@ -450,6 +450,7 @@ int main(int argc, char const* argv[]) {
cin >> t_Type;
Plot pp = p->getPlot(t_PlotID);
cout << pp.showAll();
if (!p->updatePlot(pp, t_Type)) {
cout << endl << "Update Failure!!!" << endl;
@ -709,6 +710,7 @@ void manualIni(Park& p) {
cout << "The " << ii << "th hour = ";
cin >> fee[ii];
}
feeTable[i] = fee;
}
p.updateFeeTable(feeTable);

@ -229,7 +229,7 @@ const bool Park::newCar(const string& licenseNum, const string& type,
return false;
}
if (this->isGoodType(type)) {
if (!this->isGoodType(type)) {
msg += "Car " + licenseNum + " Wrong Type!!!";
return false;
}

@ -253,7 +253,7 @@ private:
};
inline const bool isGoodType(const string& type) const {
return (bool)(find(this->_types.begin(), this->_types.end(), type) ==
return (bool)(find(this->_types.begin(), this->_types.end(), type) !=
this->_types.end());
};
};

Loading…
Cancel
Save