再次修复了代码

提高了代码的可读性
This commit is contained in:
2022-07-04 17:17:49 +08:00
parent dc7635d8d0
commit 8657066b49
8 changed files with 16 additions and 20 deletions

View File

@@ -10,7 +10,7 @@ PosPair::PosPair()
pos_y = stop_begin_y;
}
int PosPair::GetStopSpaceLength(int stop_number) const
int PosPair::GetStopSpaceLength(int stop_number)
{
return 2 * (stop_rail_width + stop_rail_height) / stop_number;
}

View File

@@ -131,15 +131,13 @@ BusStrategyBase *StrategyFactory::GetStrategy(const QString& file_name)
break;
case BUS_SCAN:
controller = new BusSCANStrategy;
break;
default:
controller = nullptr;
break;
}
if(controller != nullptr)
{
controller->rails_model->CreateRails(distance, total_station);
controller->strategy = chosen_strategy;
}
controller->rails_model->CreateRails(distance, total_station);
controller->strategy = chosen_strategy;
return controller;
}

View File

@@ -13,9 +13,7 @@ BusModel::BusModel()
}
BusModel::~BusModel()
{
}
= default;
void BusModel::ResetBus(rail_node_t *head)
{