From d15b18092bc063d2a3b2d33417f33d53cd26d0de Mon Sep 17 00:00:00 2001 From: Scott Dixon Date: Tue, 15 Oct 2024 21:58:13 -0700 Subject: [PATCH] Changing rtti destructor to non-virtual --- .vscode/settings.json | 4 ++++ cetlvast/suites/docs/CMakeLists.txt | 8 +++++++- include/cetl/rtti.hpp | 9 +++------ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 053790b9..769e3751 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -69,6 +69,10 @@ "insertable", "Kirienko", "mainpage", + "NOLINT", + "NOLINTBEGIN", + "NOLINTEND", + "NOLINTNEXTLINE", "NOTFOUND", "opencyphal", "Pavel", diff --git a/cetlvast/suites/docs/CMakeLists.txt b/cetlvast/suites/docs/CMakeLists.txt index 3f4a324c..5d65d896 100644 --- a/cetlvast/suites/docs/CMakeLists.txt +++ b/cetlvast/suites/docs/CMakeLists.txt @@ -162,9 +162,15 @@ get_property(LOCAL_EXAMPLES DIRECTORY "examples" PROPERTY IN_BUILD_TESTS) list(TRANSFORM LOCAL_EXAMPLES PREPEND "examples/") +if (NOT DEFINED CETL_PROJECT_VERSION) + set(LOCAL_OPEN_CYPHAL_PROJECT_VERSION "0.0.0") +else() + set(LOCAL_OPEN_CYPHAL_PROJECT_VERSION ${CETL_PROJECT_VERSION}) +endif() + create_docs_target( DOCS_DOXY_ROOT ${CMAKE_CURRENT_SOURCE_DIR} OPEN_CYPHAL_PROJECT_NAME "CETL" - OPEN_CYPHAL_PROJECT_VERSION ${CETL_PROJECT_VERSION} + OPEN_CYPHAL_PROJECT_VERSION ${LOCAL_OPEN_CYPHAL_PROJECT_VERSION} OPEN_CYPHAL_PROJECT_NAME_BRIEF "Cyphal Embedded Template Library" EXAMPLES_PATH diff --git a/include/cetl/rtti.hpp b/include/cetl/rtti.hpp index 0373b8fd..b49abbc2 100644 --- a/include/cetl/rtti.hpp +++ b/include/cetl/rtti.hpp @@ -236,12 +236,7 @@ class rtti /// @} protected: - rtti() = default; - rtti(const rtti&) = default; - rtti(rtti&&) = default; - virtual ~rtti() noexcept = default; - rtti& operator=(const rtti&) = default; - rtti& operator=(rtti&&) = default; + ~rtti() noexcept = default; }; /// Non-polymorphic types that want to support RTTI should simply provide a \c _get_type_id_() @@ -290,6 +285,8 @@ struct rtti_helper : public virtual cetl::rtti, public Bases... } /// @} + virtual ~rtti_helper() noexcept = default; + private: // Exhaustively search for a matching conversion throughout the entire type hierarchy tree. // Template parameter pack expansion is not available in C++14 so we do it the hard way.