Skip to content

Commit

Permalink
Removed constness of 'res' which prevented automatic move
Browse files Browse the repository at this point in the history
  • Loading branch information
mesozoic-drones committed May 1, 2020
1 parent 90a89d7 commit aa49034
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions include/just_gtfs/just_gtfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1040,49 +1040,49 @@ inline Feed::Feed(const std::string & gtfs_path) : gtfs_directory(gtfs_path) {

inline Result Feed::read_feed()
{
// Read required files
if (auto const res = read_agencies(); res.code != ResultCode::OK)
// Read required files:
if (auto res = read_agencies(); res.code != ResultCode::OK)
return res;

if (auto const res = read_stops(); res.code != ResultCode::OK)
if (auto res = read_stops(); res.code != ResultCode::OK)
return res;

if (auto const res = read_routes(); res.code != ResultCode::OK)
if (auto res = read_routes(); res.code != ResultCode::OK)
return res;

if (auto const res = read_trips(); res.code != ResultCode::OK)
if (auto res = read_trips(); res.code != ResultCode::OK)
return res;

if (auto const res = read_stop_times(); res.code != ResultCode::OK)
if (auto res = read_stop_times(); res.code != ResultCode::OK)
return res;

// Conditionally required:
if (auto const res = read_calendar(); res.code != ResultCode::OK)
// Read conditionally required files:
if (auto res = read_calendar(); res.code != ResultCode::OK)
{
if (res != ResultCode::ERROR_FILE_ABSENT)
return res;
}

if (auto const res = read_calendar_dates(); res.code != ResultCode::OK)
if (auto res = read_calendar_dates(); res.code != ResultCode::OK)
{
if (res != ResultCode::ERROR_FILE_ABSENT)
return res;
}

// Optional files:
if (auto const res = read_shapes(); res.code != ResultCode::OK)
if (auto res = read_shapes(); res.code != ResultCode::OK)
{
if (res != ResultCode::ERROR_FILE_ABSENT)
return res;
}

if (auto const res = read_transfers(); res.code != ResultCode::OK)
if (auto res = read_transfers(); res.code != ResultCode::OK)
{
if (res != ResultCode::ERROR_FILE_ABSENT)
return res;
}

if (auto const res = read_frequencies(); res.code != ResultCode::OK)
if (auto res = read_frequencies(); res.code != ResultCode::OK)
{
if (res != ResultCode::ERROR_FILE_ABSENT)
return res;
Expand Down

0 comments on commit aa49034

Please sign in to comment.