From 295f405755a2b0d3f4536bbba5b9857082efcd5f Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Mon, 20 Jun 2022 16:37:09 +0800 Subject: [PATCH] Change return from nullopt to empty data structure (#83) Signed-off-by: Luca Della Vedova --- rmf_traffic/src/rmf_traffic/schedule/Mirror.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmf_traffic/src/rmf_traffic/schedule/Mirror.cpp b/rmf_traffic/src/rmf_traffic/schedule/Mirror.cpp index aaa1f7db..238024a2 100644 --- a/rmf_traffic/src/rmf_traffic/schedule/Mirror.cpp +++ b/rmf_traffic/src/rmf_traffic/schedule/Mirror.cpp @@ -281,7 +281,7 @@ std::optional 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; }