Skip to content

Commit

Permalink
Change return from nullopt to empty data structure (#83)
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Della Vedova <[email protected]>
  • Loading branch information
luca-della-vedova authored Jun 20, 2022
1 parent 877a7c1 commit 295f405
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rmf_traffic/src/rmf_traffic/schedule/Mirror.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ std::optional<ItineraryView> Mirror::get_itinerary(
// this participant but never received a state. In that case we should
// return an empty itinerary, not a nullopt.
if (_pimpl->participant_ids.count(participant_id) > 0)
return {};
return ItineraryView{};

return std::nullopt;
}
Expand Down

0 comments on commit 295f405

Please sign in to comment.