-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of boost::optional leftovers #6977
Changes from 8 commits
bf06066
b8fe5f5
a021378
9388784
5c5d845
19a5421
02cd2c1
21ad8f7
55ac8d0
d781b17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -369,7 +369,7 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade | |
std::vector<PhantomNodeWithDistance> | ||
NearestPhantomNodesInRange(const util::Coordinate input_coordinate, | ||
const double max_distance, | ||
const boost::optional<Bearing> bearing, | ||
const std::optional<Bearing> bearing, | ||
const Approach approach, | ||
const bool use_all_edges) const override final | ||
{ | ||
|
@@ -382,20 +382,20 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade | |
std::vector<PhantomNodeWithDistance> | ||
NearestPhantomNodes(const util::Coordinate input_coordinate, | ||
const size_t max_results, | ||
const boost::optional<double> max_distance, | ||
const boost::optional<Bearing> bearing, | ||
const std::optional<double> max_distance, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Passing an optional is arguably cheap, but would it make sense to just pass a const ref? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, tbh I believe for primitive like double it won't make any difference(or even make things a bit worse due to indirection)... WDYT? |
||
const std::optional<Bearing> bearing, | ||
const Approach approach) const override final | ||
{ | ||
BOOST_ASSERT(m_geospatial_query.get()); | ||
|
||
return m_geospatial_query->NearestPhantomNodes( | ||
input_coordinate, approach, max_results, max_distance, bearing, boost::none); | ||
input_coordinate, approach, max_results, max_distance, bearing, std::nullopt); | ||
} | ||
|
||
PhantomCandidateAlternatives | ||
NearestCandidatesWithAlternativeFromBigComponent(const util::Coordinate input_coordinate, | ||
const boost::optional<double> max_distance, | ||
const boost::optional<Bearing> bearing, | ||
const std::optional<double> max_distance, | ||
const std::optional<Bearing> bearing, | ||
const Approach approach, | ||
const bool use_all_edges) const override final | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to have too much false positives - at least I couldn't understand why it fires in vast majority of places where we have it now...