Enable even more clang-tidy checks (#6273)

This commit is contained in:
Siarhei Fedartsou
2022-07-04 22:46:59 +02:00
committed by GitHub
parent 19d2ec56b8
commit 06b1b980bb
39 changed files with 84 additions and 76 deletions
+1
View File
@@ -33,6 +33,7 @@ using NamedBlock = std::tuple<std::string, Block>;
template <typename T> Block make_block(uint64_t num_entries)
{
// NOLINTNEXTLINE(misc-redundant-expression)
static_assert(sizeof(T) % alignof(T) == 0, "aligned T* can't be used as an array pointer");
return Block{num_entries, sizeof(T) * num_entries, 0};
}
+1 -1
View File
@@ -12,7 +12,7 @@ enum class Ownership
View,
External
};
}
} // namespace storage
} // namespace osrm
#endif // SHARED_MEMORY_OWNERSHIP_HPP
+3 -7
View File
@@ -100,8 +100,7 @@ inline auto make_ebn_data_view(const SharedDataIndex &index, const std::string &
auto annotation_data =
make_vector_view<extractor::NodeBasedEdgeAnnotation>(index, name + "/annotations");
return extractor::EdgeBasedNodeDataView(std::move(edge_based_node_data),
std::move(annotation_data));
return extractor::EdgeBasedNodeDataView(edge_based_node_data, annotation_data);
}
inline auto make_turn_data_view(const SharedDataIndex &index, const std::string &name)
@@ -119,11 +118,8 @@ inline auto make_turn_data_view(const SharedDataIndex &index, const std::string
const auto post_turn_bearings =
make_vector_view<guidance::TurnBearing>(index, name + "/post_turn_bearings");
return guidance::TurnDataView(std::move(turn_instructions),
std::move(lane_data_ids),
std::move(entry_class_ids),
std::move(pre_turn_bearings),
std::move(post_turn_bearings));
return guidance::TurnDataView(
turn_instructions, lane_data_ids, entry_class_ids, pre_turn_bearings, post_turn_bearings);
}
inline auto make_segment_data_view(const SharedDataIndex &index, const std::string &name)