Skip to content

Commit

Permalink
fixing warnings #3
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed Oct 31, 2023
1 parent f4ba365 commit 43329b7
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 11 deletions.
7 changes: 1 addition & 6 deletions src/dfrouter/RODFNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
}
Expand Down Expand Up @@ -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;
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/microsim/MSVehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
1 change: 0 additions & 1 deletion src/polyconvert/PCLoaderArcView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
2 changes: 0 additions & 2 deletions src/polyconvert/PCLoaderDlrNavteq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 43329b7

Please sign in to comment.