From 04f6ce0b013acd116b691aa4fdb90234f87be90b Mon Sep 17 00:00:00 2001 From: Dennis Date: Mon, 6 May 2024 16:30:43 +0200 Subject: [PATCH] Fix issues found by newer clang-tidy version --- CMakeLists.txt | 2 +- src/extractor/extractor_callbacks.cpp | 2 +- src/guidance/turn_lane_data.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc495639c..deff32848 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ if (ENABLE_CLANG_TIDY) message(FATAL_ERROR "ENABLE_CLANG_TIDY is ON but clang-tidy is not found!") else() message(STATUS "Found clang-tidy at ${CLANG_TIDY_COMMAND}") - set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND};--warnings-as-errors=*") + set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND};--warnings-as-errors=*;--header-filter=.*") endif() endif() diff --git a/src/extractor/extractor_callbacks.cpp b/src/extractor/extractor_callbacks.cpp index cfbd64933..aec61ee9f 100644 --- a/src/extractor/extractor_callbacks.cpp +++ b/src/extractor/extractor_callbacks.cpp @@ -242,7 +242,7 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti TurnLaneDescription lane_description; - typedef boost::tokenizer> tokenizer; + using tokenizer = boost::tokenizer>; boost::char_separator sep("|", "", boost::keep_empty_tokens); boost::char_separator inner_sep(";", ""); tokenizer tokens(lane_string, sep); diff --git a/src/guidance/turn_lane_data.cpp b/src/guidance/turn_lane_data.cpp index 952d788d7..5dd04ba3c 100644 --- a/src/guidance/turn_lane_data.cpp +++ b/src/guidance/turn_lane_data.cpp @@ -62,7 +62,7 @@ bool TurnLaneData::operator<(const TurnLaneData &other) const LaneDataVector laneDataFromDescription(const TurnLaneDescription &turn_lane_description) { - typedef std::unordered_map> LaneMap; + using LaneMap = std::unordered_map>; // TODO need to handle cases that have none-in between two identical values const auto num_lanes = boost::numeric_cast(turn_lane_description.size());