File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ Checks: >
2222 -cppcoreguidelines-pro-type-reinterpret-cast,
2323 -cppcoreguidelines-pro-type-union-access,
2424 -cppcoreguidelines-pro-type-vararg,
25- -cppcoreguidelines-slicing
2625
2726CheckOptions :
2827 - key : cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
Original file line number Diff line number Diff line change @@ -480,12 +480,12 @@ Optimize::decrease_truck(size_t cycle) {
480480void
481481Optimize::save_if_best () {
482482 if (duration () < best_solution.duration ()) {
483- best_solution = (*this );
483+ best_solution = static_cast < const Solution&> (*this );
484484 msg ().log << " \n *********** best by duration"
485485 << best_solution.cost_str ();
486486 }
487487 if (fleet.size () < best_solution.fleet .size ()) {
488- best_solution = (*this );
488+ best_solution = static_cast < const Solution&> (*this );
489489 msg ().log << " \n *********** best by fleet size"
490490 << best_solution.cost_str ();
491491 }
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ Order::Order(
5353std::ostream&
5454operator << (std::ostream &log, const Order &order) {
5555 log << " \n\n Order "
56- << static_cast <Identifier>(order) << " : \n "
56+ << static_cast <const Identifier& >(order) << " : \n "
5757 << " \t Pickup: " << order.pickup () << " \n "
5858 << " \t Delivery: " << order.delivery () << " \n\n "
5959 << " \t Travel time: "
You can’t perform that action at this time.
0 commit comments