Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Checks: >
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-union-access,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-slicing

CheckOptions:
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
Expand Down
4 changes: 2 additions & 2 deletions src/pickDeliver/optimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,12 @@ Optimize::decrease_truck(size_t cycle) {
void
Optimize::save_if_best() {
if (duration() < best_solution.duration()) {
best_solution = (*this);
best_solution = static_cast<const Solution&>(*this);
msg().log << "\n*********** best by duration"
<< best_solution.cost_str();
}
if (fleet.size() < best_solution.fleet.size()) {
best_solution = (*this);
best_solution = static_cast<const Solution&>(*this);
msg().log << "\n*********** best by fleet size"
<< best_solution.cost_str();
}
Expand Down
2 changes: 1 addition & 1 deletion src/pickDeliver/order.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Order::Order(
std::ostream&
operator<< (std::ostream &log, const Order &order) {
log << "\n\nOrder "
<< static_cast<Identifier>(order) << ": \n"
<< static_cast<const Identifier&>(order) << ": \n"
<< "\tPickup: " << order.pickup() << "\n"
<< "\tDelivery: " << order.delivery() << "\n\n"
<< "\tTravel time: "
Expand Down