Skip to content

Commit

Permalink
fixing warnings #3
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed Jan 29, 2025
1 parent bc1fbcb commit d5307a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/duarouter/duarouter_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ computeRoutes(RONet& net, ROLoader& loader, OptionsCont& oc) {
ROVehicle defaultVehicle(SUMOVehicleParameter(), nullptr, net.getVehicleTypeSecure(DEFAULT_VTYPE_ID), &net);
KDTreePartition<ROEdge, RONode, ROVehicle>* partition = new KDTreePartition<ROEdge, RONode, ROVehicle>(NUMBER_OF_LEVELS, ROEdge::getAllEdges(), net.hasPermissions(), oc.isSet("restriction-params"));
partition->init(&defaultVehicle);
auto ttFunction = gWeightsRandomFactor > 1 ? &ROEdge::getTravelTimeStaticRandomized : &ROEdge::getTravelTimeStatic;
auto reversedTtFunction = gWeightsRandomFactor > 1 ? &FlippedEdge<ROEdge, RONode, ROVehicle>::getTravelTimeStaticRandomized : &FlippedEdge<ROEdge, RONode, ROVehicle>::getTravelTimeStatic;
router = new AFRouter<ROEdge, RONode, ROVehicle, ROMapMatcher>(ROEdge::getAllEdges(),
partition, oc.getBool("ignore-errors"), ttFunction, reversedTtFunction, (oc.isSet("weight-files") ? string2time(oc.getString("weight-period")) : SUMOTime_MAX),
Expand Down
6 changes: 3 additions & 3 deletions src/microsim/traffic_lights/MSDriveWay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1272,13 +1272,13 @@ MSDriveWay::buildDriveWay(const std::string& id, const MSLink* link, MSRouteIter
}
std::set<MSLink*> flankSwitchesBidiExtended;
dw->checkFlanks(link, dw->myBidiExtended, visited, false, flankSwitchesBidiExtended);
for (MSLink* link : flankSwitchesBidiExtended) {
for (MSLink* const flink : flankSwitchesBidiExtended) {
#ifdef DEBUG_ADD_FOES
if (DEBUG_COND_DW) {
std::cout << " fsLinkExtended=" << link->getDescription() << "\n";
std::cout << " fsLinkExtended=" << flink->getDescription() << "\n";
}
#endif
dw->findFlankProtection(link, link, dw->myBidiExtended);
dw->findFlankProtection(flink, flink, dw->myBidiExtended);
}
MSRailSignal* rs = link ? const_cast<MSRailSignal*>(static_cast<const MSRailSignal*>(link->getTLLogic())) : nullptr;
const bool movingBlock = (rs && rs->isMovingBlock()) || (!rs && OptionsCont::getOptions().getBool("railsignal-moving-block"));
Expand Down

0 comments on commit d5307a1

Please sign in to comment.