Replace boost::string_ref with std::string_view

This commit is contained in:
Dennis Luxen
2022-10-30 13:59:59 +01:00
parent 60e283312c
commit 0021ccef59
6 changed files with 33 additions and 32 deletions
+2 -4
View File
@@ -57,8 +57,7 @@ class BaseAPI
{
// TODO: check forward/reverse
const auto toName = [this](const auto &phantom) {
return facade.GetNameForID(facade.GetNameIndex(phantom.forward_segment_id.id))
.to_string();
return std::string(facade.GetNameForID(facade.GetNameIndex(phantom.forward_segment_id.id)));
};
const auto noEmpty = [](const auto &name) { return !name.empty(); };
@@ -128,8 +127,7 @@ class BaseAPI
static_cast<float>(static_cast<double>(util::toFloating(snapped_location.lat))));
const auto toName = [this](const auto &phantom) {
return facade.GetNameForID(facade.GetNameIndex(phantom.forward_segment_id.id))
.to_string();
return std::string(facade.GetNameForID(facade.GetNameIndex(phantom.forward_segment_id.id)));
};
const auto noEmpty = [](const auto &name) { return !name.empty(); };