Fix formatting

This commit is contained in:
Dennis Luxen 2022-10-30 20:10:09 +01:00
parent 565959b389
commit 7149547645
2 changed files with 28 additions and 16 deletions

View File

@ -131,19 +131,19 @@ inline bool requiresNameAnnounced(const StringView &from_name,
const auto name_is_contained =
boost::starts_with(from_name, to_name) || boost::starts_with(to_name, from_name);
const auto checkForPrefixOrSuffixChange =
[](const std::string_view &first, const std::string_view &second, const SuffixTable &suffix_table) {
std::string first_prefix, first_suffix, second_prefix, second_suffix;
std::tie(first_prefix, first_suffix, second_prefix, second_suffix) =
decompose(first, second);
const auto checkTable = [&](const std::string &str) {
return str.empty() || suffix_table.isSuffix(str);
};
return checkTable(first_prefix) && checkTable(first_suffix) &&
checkTable(second_prefix) && checkTable(second_suffix);
const auto checkForPrefixOrSuffixChange = [](const std::string_view &first,
const std::string_view &second,
const SuffixTable &suffix_table) {
std::string first_prefix, first_suffix, second_prefix, second_suffix;
std::tie(first_prefix, first_suffix, second_prefix, second_suffix) =
decompose(first, second);
const auto checkTable = [&](const std::string &str) {
return str.empty() || suffix_table.isSuffix(str);
};
return checkTable(first_prefix) && checkTable(first_suffix) && checkTable(second_prefix) &&
checkTable(second_suffix);
};
const auto is_suffix_change = checkForPrefixOrSuffixChange(from_name, to_name, suffix_table);
const auto names_are_equal = from_name == to_name || name_is_contained || is_suffix_change;

View File

@ -203,7 +203,10 @@ class ContiguousInternalMemoryDataFacade<routing_algorithms::offline::Algorithm>
return DatasourceReverseRange(DatasourceForwardRange());
}
std::string_view GetDatasourceName(const DatasourceID /*id*/) const override { return std::string_view{}; }
std::string_view GetDatasourceName(const DatasourceID /*id*/) const override
{
return std::string_view{};
}
guidance::TurnInstruction GetTurnInstructionForEdgeID(const EdgeID /*id*/) const override
{
@ -272,9 +275,18 @@ class ContiguousInternalMemoryDataFacade<routing_algorithms::offline::Algorithm>
NameID GetNameIndex(const NodeID /*nodeID*/) const override { return EMPTY_NAMEID; }
std::string_view GetNameForID(const NameID /*id*/) const override { return std::string_view{}; }
std::string_view GetRefForID(const NameID /*id*/) const override { return std::string_view{}; }
std::string_view GetPronunciationForID(const NameID /*id*/) const override { return std::string_view{}; }
std::string_view GetDestinationsForID(const NameID /*id*/) const override { return std::string_view{}; }
std::string_view GetExitsForID(const NameID /*id*/) const override { return std::string_view{}; }
std::string_view GetPronunciationForID(const NameID /*id*/) const override
{
return std::string_view{};
}
std::string_view GetDestinationsForID(const NameID /*id*/) const override
{
return std::string_view{};
}
std::string_view GetExitsForID(const NameID /*id*/) const override
{
return std::string_view{};
}
bool GetContinueStraightDefault() const override { return false; }
std::string GetTimestamp() const override { return ""; }
double GetMapMatchingMaxSpeed() const override { return 0; }