Skip to content

Commit

Permalink
fixing style and warnings #22 #3
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed Mar 19, 2024
1 parent 66f7978 commit 3fcd15a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/microsim/devices/MSDevice_FCDReplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ MSDevice_FCDReplay::FCDHandler::addTrafficObjects() {
device->setTrajectory(&t);
} else {
const std::string dummyRouteID = "DUMMY_ROUTE_" + id;
Trajectory& t = myTrajectories[id];
const std::vector<SUMOVehicleParameter::Stop> stops;
ConstMSRoutePtr route = std::make_shared<MSRoute>(dummyRouteID, std::get<3>(desc.second), true, nullptr, stops);
if (!MSRoute::dictionary(dummyRouteID, route)) {
Expand Down
2 changes: 1 addition & 1 deletion src/netbuild/NBNetBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ NBNetBuilder::compute(OptionsCont& oc, const std::set<std::string>& explicitTurn

if (lefthand != oc.getBool("flip-y-axis")) {
mirrorX();
};
}

if (oc.exists("geometry.check-overlap") && oc.getFloat("geometry.check-overlap") > 0) {
before = PROGRESS_BEGIN_TIME_MESSAGE(TL("Checking overlapping edges"));
Expand Down
17 changes: 8 additions & 9 deletions src/netimport/NIImporter_OpenStreetMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ NIImporter_OpenStreetMap::insertEdge(Edge* e, int index, NBNode* from, NBNode* t
}
// get additional direction information
int nodeDirection = myOSMNodes.find(StringUtils::toLong(from->getID()))->second->myRailDirection |
myOSMNodes.find(StringUtils::toLong(to->getID()))->second->myRailDirection;
myOSMNodes.find(StringUtils::toLong(to->getID()))->second->myRailDirection;

std::vector<std::shared_ptr<NBPTStop> > ptStops;
for (long long i : passed) {
Expand Down Expand Up @@ -553,11 +553,11 @@ NIImporter_OpenStreetMap::insertEdge(Edge* e, int index, NBNode* from, NBNode* t
#ifdef DEBUG_LAYER_ELEVATION
if (e->id == "DEBUGID") {
std::cout
<< " id=" << id << " from=" << from->getID() << " fromRailDirection=" << myOSMNodes.find(StringUtils::toLong(from->getID()))->second->myRailDirection
<< " to=" << to->getID() << " toRailDirection=" << myOSMNodes.find(StringUtils::toLong(to->getID()))->second->myRailDirection
<< " origRailDirection=" << e->myRailDirection
<< " nodeDirection=" << nodeDirection
<< "\n";
<< " id=" << id << " from=" << from->getID() << " fromRailDirection=" << myOSMNodes.find(StringUtils::toLong(from->getID()))->second->myRailDirection
<< " to=" << to->getID() << " toRailDirection=" << myOSMNodes.find(StringUtils::toLong(to->getID()))->second->myRailDirection
<< " origRailDirection=" << e->myRailDirection
<< " nodeDirection=" << nodeDirection
<< "\n";
}
#endif
if (e->myRailDirection == WAY_UNKNOWN && nodeDirection != WAY_UNKNOWN && nodeDirection != WAY_FORWARD
Expand Down Expand Up @@ -923,8 +923,7 @@ NIImporter_OpenStreetMap::NodesHandler::NodesHandler(std::map<long long int, NIO
myUniqueNodes(uniqueNodes),
myImportElevation(oc.getBool("osm.elevation")),
myDuplicateNodes(0),
myOptionsCont(oc)
{
myOptionsCont(oc) {
// init rail signal rules
for (std::string kv : oc.getStringVector("osm.railsignals")) {
if (kv == "DEFAULT") {
Expand Down Expand Up @@ -2073,7 +2072,7 @@ NIImporter_OpenStreetMap::RelationHandler::myEndElement(int element) {
}
if (hadGap) {
WRITE_WARNINGF(TL("PT line '%' in relation % seems to be split, only keeping first part."), myName, myCurrentRelation);
missingAfter = myStops.size() - missingBefore - ptLine->getStops().size();
missingAfter = (int)myStops.size() - missingBefore - (int)ptLine->getStops().size();
break;
}

Expand Down

0 comments on commit 3fcd15a

Please sign in to comment.