Skip to content

Commit

Permalink
Refactor double negation away
Browse files Browse the repository at this point in the history
  • Loading branch information
koch-t committed Apr 25, 2014
1 parent 3ea7ca2 commit f2ba9ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/ed/connectors/gtfs_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,17 @@ void StopsGtfsHandler::finish(Data& data) {

void StopsGtfsHandler::handle_stop_point_without_area(Data& data) {
//we have to check if there was stop area in the file
bool has_stop_area = (!data.stop_areas.empty());
if (! has_stop_area) {
bool has_no_stop_areas = data.stop_areas.empty();
if (has_no_stop_areas) {
for (const auto sp : data.stop_points) {
if (sp->stop_area) {
has_stop_area = true;
has_no_stop_areas = false;
break;
}
}
}

if (! has_stop_area) {
if (has_no_stop_areas) {
//we artificialy create one stop_area by stop point
for (const auto sp : data.stop_points) {
auto sa = new nm::StopArea;
Expand Down

1 comment on commit f2ba9ec

@koch-t
Copy link
Owner Author

@koch-t koch-t commented on f2ba9ec Apr 25, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove double negation to improve the readability

Please sign in to comment.