Skip to content

Commit 453afd7

Browse files
committed
Bugfix
1 parent e027caf commit 453afd7

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/dsf/sources/RoadNetwork.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,16 +1051,21 @@ namespace dsf {
10511051
} else {
10521052
file << "Nan;Nan";
10531053
}
1054+
bool const bIsOrigin{std::find(m_originNodes.begin(),
1055+
m_originNodes.end(),
1056+
nodeId) != m_originNodes.end()};
1057+
bool const bIsDestination{std::find(m_destinationNodes.begin(),
1058+
m_destinationNodes.end(),
1059+
nodeId) != m_destinationNodes.end()};
10541060
if (pNode->isTrafficLight()) {
10551061
file << ";traffic_light";
10561062
} else if (pNode->isRoundabout()) {
10571063
file << ";roundabout";
1058-
} else if (std::find(m_originNodes.begin(), m_originNodes.end(), nodeId) !=
1059-
m_originNodes.end()) {
1064+
} else if (bIsOrigin && bIsDestination) {
1065+
file << ";origin-destination";
1066+
} else if (bIsOrigin) {
10601067
file << ";origin";
1061-
} else if (std::find(m_destinationNodes.begin(),
1062-
m_destinationNodes.end(),
1063-
nodeId) != m_destinationNodes.end()) {
1068+
} else if (bIsDestination) {
10641069
file << ";destination";
10651070
} else {
10661071
file << ";";

0 commit comments

Comments
 (0)