Skip to content

Commit c8de759

Browse files
Use std::string_view::starts_with instead of boost::starts_with (#6918)
1 parent fb9d1ce commit c8de759

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
- NodeJS:
2424
- CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452)
2525
- Misc:
26+
- CHANGED: Use std::string_view::starts_with instead of boost::starts_with. [#6918](https://github.com/Project-OSRM/osrm-backend/pull/6918)
2627
- CHANGED: Get rid of boost::math::constants::* and M_PI in favor of std::numbers. [#6916](https://github.com/Project-OSRM/osrm-backend/pull/6916)
2728
- CHANGED: Make constants in PackedVector constexpr. [#6917](https://github.com/Project-OSRM/osrm-backend/pull/6917)
2829
- CHANGED: Use std::variant instead of mapbox::util::variant. [#6903](https://github.com/Project-OSRM/osrm-backend/pull/6903)

include/util/guidance/name_announcements.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
#include "util/typedefs.hpp"
1010

11-
#include <boost/algorithm/string.hpp>
12-
1311
#include <algorithm>
1412
#include <string>
1513
#include <tuple>
@@ -126,8 +124,7 @@ inline bool requiresNameAnnounced(const StringView &from_name,
126124

127125
// check similarity of names
128126
const auto names_are_empty = from_name.empty() && to_name.empty();
129-
const auto name_is_contained =
130-
boost::starts_with(from_name, to_name) || boost::starts_with(to_name, from_name);
127+
const auto name_is_contained = from_name.starts_with(to_name) || to_name.starts_with(from_name);
131128

132129
const auto checkForPrefixOrSuffixChange = [](const std::string_view first,
133130
const std::string_view second,

0 commit comments

Comments
 (0)