Fixed clang-tidy warnings

This commit is contained in:
Bartek Kryza
2024-01-02 23:17:32 +01:00
parent eec73a79e8
commit da7870f50f
43 changed files with 188 additions and 226 deletions

View File

@@ -103,7 +103,7 @@ public:
* @param id Element id.
* @return Optional reference to a diagram element.
*/
opt_ref<diagram_element> get(diagram_element::id_t id) const override;
opt_ref<diagram_element> get(common::id_t id) const override;
/**
* @brief Get list of references to classes in the diagram model.
@@ -172,8 +172,7 @@ public:
* @param id Id of the element
* @return Optional reference to a diagram element
*/
template <typename ElementT>
opt_ref<ElementT> find(diagram_element::id_t id) const;
template <typename ElementT> opt_ref<ElementT> find(common::id_t id) const;
/**
* @brief Get reference to vector of elements of specific type
@@ -219,7 +218,7 @@ public:
* @param id Id of the diagram element.
* @return PlantUML alias.
*/
std::string to_alias(diagram_element::id_t id) const;
std::string to_alias(common::id_t id) const;
/**
* @brief Given an initial set of classes, add all their parents to the
@@ -236,7 +235,7 @@ public:
* @param id Id of the element.
* @return True, if diagram contains an element with a specific id.
*/
bool has_element(diagram_element::id_t id) const override;
bool has_element(common::id_t id) const override;
/**
* @brief Remove redundant dependency relationships
@@ -421,7 +420,7 @@ std::vector<opt_ref<ElementT>> diagram::find(
}
template <typename ElementT>
opt_ref<ElementT> diagram::find(diagram_element::id_t id) const
opt_ref<ElementT> diagram::find(common::id_t id) const
{
for (const auto &element : element_view<ElementT>::view()) {
if (element.get().id() == id) {