From 43329b7350db404291acb7aee67c6823e22f7605 Mon Sep 17 00:00:00 2001 From: Michael Behrisch Date: Tue, 31 Oct 2023 16:24:25 +0100 Subject: [PATCH] fixing warnings #3 --- src/dfrouter/RODFNet.cpp | 7 +------ src/microsim/MSVehicle.cpp | 2 -- src/polyconvert/PCLoaderArcView.cpp | 1 - src/polyconvert/PCLoaderDlrNavteq.cpp | 2 -- 4 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/dfrouter/RODFNet.cpp b/src/dfrouter/RODFNet.cpp index c0f848297717..ee5d68aa0af9 100644 --- a/src/dfrouter/RODFNet.cpp +++ b/src/dfrouter/RODFNet.cpp @@ -729,13 +729,10 @@ RODFNet::isSource(const RODFDetector& det, ROEdge* edge, // the next is a hack for the A100 scenario... // We have to look into further edges herein edges const ROEdgeVector& appr = myApproachingEdges.find(edge)->second; - int noOk = 0; int noFalse = 0; int noSkipped = 0; for (int i = 0; i < (int)appr.size(); i++) { - if (!hasDetector(appr[i])) { - noOk++; - } else { + if (hasDetector(appr[i])) { noFalse++; } } @@ -848,13 +845,11 @@ RODFNet::isDestination(const RODFDetector& det, ROEdge* edge, ROEdgeVector& seen } const ROEdgeVector& appr = myApproachedEdges.find(edge)->second; bool isall = true; - int no = 0; seen.push_back(edge); for (int i = 0; i < (int)appr.size() && isall; i++) { bool had = std::find(seen.begin(), seen.end(), appr[i]) != seen.end(); if (!had) { if (!isDestination(det, appr[i], seen, detectors)) { - no++; isall = false; } } diff --git a/src/microsim/MSVehicle.cpp b/src/microsim/MSVehicle.cpp index 29b7739ad1bb..477d93a58d77 100644 --- a/src/microsim/MSVehicle.cpp +++ b/src/microsim/MSVehicle.cpp @@ -2287,13 +2287,11 @@ MSVehicle::planMoveInternal(const SUMOTime t, MSLeaderInfo ahead, DriveItemVecto std::cout << SIMTIME << " veh=" << getID() << " lane=" << lane->getID() << " sublaneOffset=" << sublaneOffset << " outsideLeft=" << outsideLeft << "\n"; } #endif - int addedOutsideCands = 0; for (const MSVehicle* cand : lane->getVehiclesSecure()) { if ((lane != myLane || cand->getPositionOnLane() > getPositionOnLane()) && ((!outsideLeft && cand->getLeftSideOnEdge() < 0) || (outsideLeft && cand->getLeftSideOnEdge() > lane->getEdge().getWidth()))) { outsideLeaders.addLeader(cand, true); - addedOutsideCands++; #ifdef DEBUG_PLAN_MOVE if (DEBUG_COND) { std::cout << " outsideLeader=" << cand->getID() << " ahead=" << outsideLeaders.toString() << "\n"; diff --git a/src/polyconvert/PCLoaderArcView.cpp b/src/polyconvert/PCLoaderArcView.cpp index 5e3e29b7f3ff..18e89d0095f4 100644 --- a/src/polyconvert/PCLoaderArcView.cpp +++ b/src/polyconvert/PCLoaderArcView.cpp @@ -79,7 +79,6 @@ PCLoaderArcView::loadIfSet(OptionsCont& oc, PCPolyContainer& toFill, PCTypeMap& #ifdef HAVE_GDAL const PositionVector PCLoaderArcView::toShape(OGRLineString* geom, const std::string& tid) { - const OGRSpatialReference* const srs = geom->getSpatialReference(); if (myWarnMissingProjection) { int outOfRange = 0; for (int j = 0; j < geom->getNumPoints(); j++) { diff --git a/src/polyconvert/PCLoaderDlrNavteq.cpp b/src/polyconvert/PCLoaderDlrNavteq.cpp index 481f0cd74034..e4d661b91c74 100644 --- a/src/polyconvert/PCLoaderDlrNavteq.cpp +++ b/src/polyconvert/PCLoaderDlrNavteq.cpp @@ -174,11 +174,9 @@ PCLoaderDlrNavteq::loadPolyFile(const std::string& file, RGBColor c = RGBColor::parseColor(oc.getString("color")); // attributes of the poly // parse - int l = 0; LineReader lr(file); while (lr.hasMore()) { std::string line = lr.readLine(); - ++l; // skip invalid/empty lines if (line.length() == 0 || line.find("#") != std::string::npos) { continue;