From 98d17daa72bde167716e10776e678f41bfd20533 Mon Sep 17 00:00:00 2001 From: Alexander Sherikov Date: Tue, 21 Nov 2023 00:47:18 +0400 Subject: [PATCH] Use find_package for msgpack --- CHANGELOG.md | 2 +- Makefile | 9 ++--- cmake/cmakeut_compiler_flags.cmake | 9 +++-- extra_visitors/jsonnet/src/reader.cpp | 2 +- extra_visitors/msgpack/CMakeLists.txt | 28 +++++++++------ extra_visitors/msgpack/src/reader.cpp | 4 +-- extra_visitors/msgpack/src/reader_compact.cpp | 2 +- extra_visitors/msgpack/src/writer.cpp | 13 ++++--- extra_visitors/msgpack/src/writer_compact.cpp | 13 ++++--- extra_visitors/pugixml/src/reader.cpp | 16 ++++----- extra_visitors/pugixml/src/writer.cpp | 8 ++--- extra_visitors/yaml_cpp/CMakeLists.txt | 6 +++- extra_visitors/yaml_cpp/src/reader.cpp | 4 +-- tests/api_v2/all_enabled_visitors.h | 18 +++++----- tests/api_v2/regression_test_216.cpp | 34 +++++++++---------- tests/api_v2/regression_test_223.cpp | 26 +++++++------- tests/api_v2/regression_test_224.cpp | 4 +++ tests/api_v2/testlib1.cpp | 3 ++ tests/api_v2/testlib2.cpp | 2 ++ 19 files changed, 112 insertions(+), 91 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bef9d5ae..ee4052de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ Added ----- * Writers now take `allow_missing_entries_` parameter into account, omitting 'missing' entries, e.g., null pointers. -* Searching for `find_package()` with yaml-cpp. +* Searching for `yaml-cpp` and `msgpack` with `find_package()`. * `ARILES_CPP_STANDARD` cmake flag. * `ariles::write::Parameters`: +`allow_missing_entries_` * `OptionalPointer` wrapper class for pointers that can be NULL if entry is missing. diff --git a/Makefile b/Makefile index 89e12737..e67cf3b8 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ APT_INSTALL?=env DEBIAN_FRONTEND=noninteractive apt --yes --no-install-recommends install -MAKE_FLAGS?=-j7 +MAKE_FLAGS?=-j14 CMAKE_DIR=./cmake/ @@ -141,8 +141,8 @@ test-ros: clean test-noros: clean - ${MAKE} build-tests TC=${TC} TYPE=Debug OPTIONS=cpp11_on_noros TARGETS="${TARGETS}" EXTRA_CMAKE_PARAM="${EXTRA_CMAKE_PARAM}" - ${MAKE} clangcheck SCANBUILD=scan-build11 OPTIONS=cpp11_on_noros_tidy + ${MAKE} build-tests TC=${TC} TYPE=Debug OPTIONS=noros TARGETS="${TARGETS}" EXTRA_CMAKE_PARAM="${EXTRA_CMAKE_PARAM}" + ${MAKE} clangcheck SCANBUILD=scan-build15 OPTIONS=noros_tidy ${MAKE} cppcheck ${MAKE} spell @@ -209,7 +209,7 @@ install-deps: format: - ${FIND_ARILES_SOURCES} | grep -v "better_enum.h" | xargs clang-format-12 -verbose -i + ${FIND_ARILES_SOURCES} | grep -v "better_enum.h" | xargs clang-format15 -verbose -i cppcheck: # --inconclusive @@ -231,6 +231,7 @@ cppcheck: --suppress=unknownMacro \ --suppress=constStatement \ --suppress=unsignedLessThanZero \ + --suppress=duplInheritedMember \ -i build \ -i tests/api_v2/regression_test_230.cpp \ 3>&1 1>&2 2>&3 | tee cppcheck.err diff --git a/cmake/cmakeut_compiler_flags.cmake b/cmake/cmakeut_compiler_flags.cmake index d358f896..6d9e5195 100644 --- a/cmake/cmakeut_compiler_flags.cmake +++ b/cmake/cmakeut_compiler_flags.cmake @@ -59,7 +59,7 @@ function(cmakeut_compiler_flags STANDARD) if (CMAKEUT_CLANG_TIDY) - find_program(CLANG_TIDY_EXECUTABLE NAMES clang-tidy clang-tidy-12 clang-tidy-14 REQUIRED) + find_program(CLANG_TIDY_EXECUTABLE NAMES clang-tidy clang-tidy-12 clang-tidy-14 clang-tidy15 REQUIRED) set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_EXECUTABLE};-warnings-as-errors=*;-checks=*") @@ -74,7 +74,7 @@ function(cmakeut_compiler_flags STANDARD) # member variables can be public/protected set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-cppcoreguidelines-non-private-member-variables-in-classes,-misc-non-private-member-variables-in-classes") # member initialization in constructors -- false positives - set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-cppcoreguidelines-pro-type-member-init,-hicpp-member-init") + set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-cppcoreguidelines-pro-type-member-init,-hicpp-member-init,-cppcoreguidelines-prefer-member-initializer") # default member initialization scatters initializations -- initialization must be done via constructors set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-modernize-use-default-member-init") # calling virtual functions from desctructors is well defined and generally safe @@ -100,6 +100,11 @@ function(cmakeut_compiler_flags STANDARD) # llvmlibc stuff set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-llvmlibc-*") + # noisy + set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-altera-unroll-loops,-altera-id-dependent-backward-branch,-readability-identifier-length") + # false positives? + set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-bugprone-exception-escape,-clang-analyzer-cplusplus.NewDelete") + set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},${CMAKEUT_CLANG_TIDY_EXTRA_IGNORES}") # might be useful too diff --git a/extra_visitors/jsonnet/src/reader.cpp b/extra_visitors/jsonnet/src/reader.cpp index 872b2e94..8e46ca4d 100644 --- a/extra_visitors/jsonnet/src/reader.cpp +++ b/extra_visitors/jsonnet/src/reader.cpp @@ -30,7 +30,7 @@ namespace ariles2 Reader::Reader() { - preprocessor_ = JsonnetPreprocessorPtr(new JsonnetPreprocessor()); + preprocessor_ = std::make_shared(); preprocessor_->vm_ = static_cast(::jsonnet_make()); ARILES2_ASSERT(NULL != preprocessor_->vm_, "Could not initialize jsonnet preprocessor."); } diff --git a/extra_visitors/msgpack/CMakeLists.txt b/extra_visitors/msgpack/CMakeLists.txt index e64713e5..7dddba01 100644 --- a/extra_visitors/msgpack/CMakeLists.txt +++ b/extra_visitors/msgpack/CMakeLists.txt @@ -1,20 +1,26 @@ set (TGT_ARILES_VISITOR_LIB "${PROJECT_NAME}_visitor_${ARILES_VISITOR}") if(NOT ARILES_DEB_TARGETS) - find_library("ARILES_VISITOR_${ARILES_VISITOR}_LIBS" NAMES ${ARILES_VISITOR}) - find_path("ARILES_VISITOR_${ARILES_VISITOR}_INCLUDES" NAMES msgpack.hpp) + find_package(msgpack-cxx) - if (NOT ARILES_VISITOR_${ARILES_VISITOR}_LIBS OR NOT ARILES_VISITOR_${ARILES_VISITOR}_INCLUDES) - pkg_search_module(${ARILES_VISITOR} msgpack) + if (msgpack-cxx_FOUND) + set(ARILES_VISITOR_${ARILES_VISITOR}_LIBS "msgpack-cxx") + else() + find_library("ARILES_VISITOR_${ARILES_VISITOR}_LIBS" NAMES ${ARILES_VISITOR}) + find_path("ARILES_VISITOR_${ARILES_VISITOR}_INCLUDES" NAMES msgpack.hpp) - if (${ARILES_VISITOR}_FOUND) - set(ARILES_VISITOR_${ARILES_VISITOR}_LIBRARY_DIRS "${${ARILES_VISITOR}_LIBRARY_DIRS}") - set(ARILES_VISITOR_${ARILES_VISITOR}_INCLUDES "${${ARILES_VISITOR}_INCLUDE_DIRS}") - set(ARILES_VISITOR_${ARILES_VISITOR}_LIBS "${${ARILES_VISITOR}_LIBRARIES}") + if (NOT ARILES_VISITOR_${ARILES_VISITOR}_LIBS OR NOT ARILES_VISITOR_${ARILES_VISITOR}_INCLUDES) + pkg_search_module(${ARILES_VISITOR} msgpack) - link_directories(${ARILES_VISITOR_${ARILES_VISITOR}_LIBRARY_DIRS}) - else() - message(FATAL_ERROR "${ARILES_VISITOR} is not found.") + if (${ARILES_VISITOR}_FOUND) + set(ARILES_VISITOR_${ARILES_VISITOR}_LIBRARY_DIRS "${${ARILES_VISITOR}_LIBRARY_DIRS}") + set(ARILES_VISITOR_${ARILES_VISITOR}_INCLUDES "${${ARILES_VISITOR}_INCLUDE_DIRS}") + set(ARILES_VISITOR_${ARILES_VISITOR}_LIBS "${${ARILES_VISITOR}_LIBRARIES}") + + link_directories(${ARILES_VISITOR_${ARILES_VISITOR}_LIBRARY_DIRS}) + else() + message(FATAL_ERROR "${ARILES_VISITOR} is not found.") + endif() endif() endif() endif() diff --git a/extra_visitors/msgpack/src/reader.cpp b/extra_visitors/msgpack/src/reader.cpp index d6f6ca67..d985f750 100644 --- a/extra_visitors/msgpack/src/reader.cpp +++ b/extra_visitors/msgpack/src/reader.cpp @@ -65,9 +65,9 @@ namespace ariles2 while (buffer_offset != buffer_.size()) { - handles_.push_back(std::shared_ptr<::msgpack::object_handle>(new ::msgpack::object_handle)); + handles_.push_back(std::make_shared<::msgpack::object_handle>()); - unpack(*handles_[handles_.size() - 1], buffer_.data(), buffer_.size(), buffer_offset); + unpack(*handles_.back(), buffer_.data(), buffer_.size(), buffer_offset); } } catch (const std::exception &e) diff --git a/extra_visitors/msgpack/src/reader_compact.cpp b/extra_visitors/msgpack/src/reader_compact.cpp index 41949f2c..bbf41bc3 100644 --- a/extra_visitors/msgpack/src/reader_compact.cpp +++ b/extra_visitors/msgpack/src/reader_compact.cpp @@ -149,7 +149,7 @@ namespace ariles2 std::size_t Reader::startArray() { - std::size_t size = impl_->getRawNode().via.array.size; + const std::size_t size = impl_->getRawNode().via.array.size; impl_->node_stack_.emplace_back(0, size); return (size); diff --git a/extra_visitors/msgpack/src/writer.cpp b/extra_visitors/msgpack/src/writer.cpp index 7bb2f8f9..71003bf1 100644 --- a/extra_visitors/msgpack/src/writer.cpp +++ b/extra_visitors/msgpack/src/writer.cpp @@ -27,11 +27,6 @@ namespace ariles2 using PackerPtr = std::shared_ptr<::msgpack::packer>; - private: - Writer(const Writer &); - void operator=(const Writer &); - - public: /// output file stream std::ofstream config_ofs_; @@ -45,11 +40,15 @@ namespace ariles2 public: + Writer(const Writer &) = delete; + void operator=(const Writer &) = delete; + + explicit Writer(const std::string &file_name) { ariles2::write::Visitor::openFile(config_ofs_, file_name); output_stream_ = &config_ofs_; - packer_ = PackerPtr(new ::msgpack::packer(*output_stream_)); + packer_ = std::make_shared<::msgpack::packer>(*output_stream_); nameless_counter_ = 0; } @@ -58,7 +57,7 @@ namespace ariles2 explicit Writer(std::ostream &output_stream) { output_stream_ = &output_stream; - packer_ = PackerPtr(new ::msgpack::packer(*output_stream_)); + packer_ = std::make_shared<::msgpack::packer>(*output_stream_); nameless_counter_ = 0; } diff --git a/extra_visitors/msgpack/src/writer_compact.cpp b/extra_visitors/msgpack/src/writer_compact.cpp index fd6256a8..fd17e91f 100644 --- a/extra_visitors/msgpack/src/writer_compact.cpp +++ b/extra_visitors/msgpack/src/writer_compact.cpp @@ -26,11 +26,6 @@ namespace ariles2 using PackerPtr = std::shared_ptr<::msgpack::packer>; - private: - Writer(const Writer &); - void operator=(const Writer &); - - public: /// output file stream std::ofstream config_ofs_; @@ -41,18 +36,22 @@ namespace ariles2 PackerPtr packer_; public: + Writer(const Writer &) = delete; + void operator=(const Writer &) = delete; + + explicit Writer(const std::string &file_name) { ariles2::write::Visitor::openFile(config_ofs_, file_name); output_stream_ = &config_ofs_; - packer_ = PackerPtr(new ::msgpack::packer(*output_stream_)); + packer_ = std::make_shared<::msgpack::packer>(*output_stream_); } explicit Writer(std::ostream &output_stream) { output_stream_ = &output_stream; - packer_ = PackerPtr(new ::msgpack::packer(*output_stream_)); + packer_ = std::make_shared<::msgpack::packer>(*output_stream_); } }; } // namespace impl diff --git a/extra_visitors/pugixml/src/reader.cpp b/extra_visitors/pugixml/src/reader.cpp index 4b68cfe7..49fc98a4 100644 --- a/extra_visitors/pugixml/src/reader.cpp +++ b/extra_visitors/pugixml/src/reader.cpp @@ -47,9 +47,9 @@ namespace ariles2 { Reader::Reader(const std::string &file_name) { - impl_ = ImplPtr(new impl::Reader()); + impl_ = std::make_shared(); - pugi::xml_parse_result result = impl_->document_.load_file(file_name.c_str(), pugi::parse_minimal); + const pugi::xml_parse_result result = impl_->document_.load_file(file_name.c_str(), pugi::parse_minimal); ARILES2_ASSERT(result, std::string("Parsing of '") + file_name + "' failed: " + result.description()); impl_->node_stack_.push_back(impl_->document_); // NOLINT } @@ -57,9 +57,9 @@ namespace ariles2 Reader::Reader(std::istream &input_stream) { - impl_ = ImplPtr(new impl::Reader()); + impl_ = std::make_shared(); - pugi::xml_parse_result result = impl_->document_.load(input_stream, pugi::parse_minimal); + const pugi::xml_parse_result result = impl_->document_.load(input_stream, pugi::parse_minimal); ARILES2_ASSERT(result, std::string("Parsing failed: ") + result.description()); impl_->node_stack_.push_back(impl_->document_); // NOLINT } @@ -71,16 +71,16 @@ namespace ariles2 if (NULL != child) { - impl_->node_stack_.push_back(child); + impl_->node_stack_.emplace_back(child); return (true); } const pugi::xml_attribute attribute = impl_->getRawNode().attribute(child_name.c_str()); if (NULL != attribute) { - pugi::xml_node new_child = impl_->getRawNode().append_child(child_name.c_str()); + const pugi::xml_node new_child = impl_->getRawNode().append_child(child_name.c_str()); new_child.text() = attribute.value(); - impl_->node_stack_.push_back(new_child); + impl_->node_stack_.emplace_back(new_child); return (true); } @@ -99,7 +99,7 @@ namespace ariles2 const std::size_t /*min*/, const std::size_t /*max*/) { - pugi::xml_node child = impl_->getRawNode().first_child(); + const pugi::xml_node child = impl_->getRawNode().first_child(); if (NULL != child) { impl_->node_stack_.emplace_back(child, NodeWrapper::ITERATED_MAP); diff --git a/extra_visitors/pugixml/src/writer.cpp b/extra_visitors/pugixml/src/writer.cpp index 8fed85dc..6048f3ba 100644 --- a/extra_visitors/pugixml/src/writer.cpp +++ b/extra_visitors/pugixml/src/writer.cpp @@ -69,13 +69,13 @@ namespace ariles2 { Writer::Writer(const std::string &file_name) { - impl_ = ImplPtr(new impl::Writer(file_name)); + impl_ = std::make_shared(file_name); } Writer::Writer(std::ostream &output_stream) { - impl_ = ImplPtr(new impl::Writer(output_stream)); + impl_ = std::make_shared(output_stream); } @@ -89,7 +89,7 @@ namespace ariles2 void Writer::startMapEntry(const std::string &map_name) { - impl_->node_stack_.push_back(impl_->getRawNode().append_child(map_name.c_str())); + impl_->node_stack_.emplace_back(impl_->getRawNode().append_child(map_name.c_str())); } void Writer::endMapEntry() @@ -108,7 +108,7 @@ namespace ariles2 ARILES2_ASSERT( impl_->node_stack_.back().index_ < impl_->node_stack_.back().size_, "Internal error: namevalue.has more elements than expected."); - impl_->node_stack_.push_back(impl_->getRawNode().append_child("item")); + impl_->node_stack_.emplace_back(impl_->getRawNode().append_child("item")); } void Writer::endArrayElement() diff --git a/extra_visitors/yaml_cpp/CMakeLists.txt b/extra_visitors/yaml_cpp/CMakeLists.txt index c4e3062f..3df71bf1 100644 --- a/extra_visitors/yaml_cpp/CMakeLists.txt +++ b/extra_visitors/yaml_cpp/CMakeLists.txt @@ -5,7 +5,11 @@ if(NOT ARILES_DEB_TARGETS) if(yaml-cpp_FOUND) set(ARILES_VISITOR_${ARILES_VISITOR}_INCLUDES "${YAML_CPP_INCLUDE_DIR}") - set(ARILES_VISITOR_${ARILES_VISITOR}_LIBS "yaml-cpp") + if(TARGET yaml-cpp) + set(ARILES_VISITOR_${ARILES_VISITOR}_LIBS "yaml-cpp") + else() + set(ARILES_VISITOR_${ARILES_VISITOR}_LIBS "yaml-cpp::yaml-cpp") + endif() else() pkg_search_module(${ARILES_VISITOR} REQUIRED yaml-cpp>=0.5.1) diff --git a/extra_visitors/yaml_cpp/src/reader.cpp b/extra_visitors/yaml_cpp/src/reader.cpp index 4bebce47..d7d42bf2 100644 --- a/extra_visitors/yaml_cpp/src/reader.cpp +++ b/extra_visitors/yaml_cpp/src/reader.cpp @@ -86,7 +86,7 @@ namespace ariles2 bool Reader::startMapEntry(const std::string &child_name) { ARILES2_TRACE_FUNCTION; - YAML::Node child = impl_->getRawNode()[child_name]; + const YAML::Node child = impl_->getRawNode()[child_name]; if (not child.IsDefined() or child.IsNull()) { @@ -156,7 +156,7 @@ namespace ariles2 ARILES2_TRACE_FUNCTION; ARILES2_ASSERT(impl_->getRawNode().IsSequence(), "Entry is not an array."); - std::size_t size = impl_->getRawNode().size(); + const std::size_t size = impl_->getRawNode().size(); impl_->node_stack_.emplace_back(0, size); return (size); diff --git a/tests/api_v2/all_enabled_visitors.h b/tests/api_v2/all_enabled_visitors.h index cb4ace29..207635b9 100644 --- a/tests/api_v2/all_enabled_visitors.h +++ b/tests/api_v2/all_enabled_visitors.h @@ -36,14 +36,14 @@ // Do not have Reader and therefore are excluded from most of the tests // -//#ifdef ARILES_VISITOR_octave -//#include -//#endif +// #ifdef ARILES_VISITOR_octave +// #include +// #endif // -//#ifdef ARILES_VISITOR_namevalue -//#include -//#endif +// #ifdef ARILES_VISITOR_namevalue +// #include +// #endif // -//#ifdef ARILES_VISITOR_graphviz -//#include -//#endif +// #ifdef ARILES_VISITOR_graphviz +// #include +// #endif diff --git a/tests/api_v2/regression_test_216.cpp b/tests/api_v2/regression_test_216.cpp index 92f1ac13..885f969a 100644 --- a/tests/api_v2/regression_test_216.cpp +++ b/tests/api_v2/regression_test_216.cpp @@ -43,23 +43,23 @@ int main() { - ariles_tests::ConfigurableComplex a; - ariles_tests::ConfigurableComplexVerbose b; - ariles_tests::ConfigurableEmpty c; - ariles_tests::ConfigurableFinalize d; - ariles_tests::ConfigurableMember e; - ariles_tests::ConfigurableBase f; - ariles_tests::ConfigurableDerived g; - ariles_tests::ConfigurableMinimal h; - ariles_tests::ConfigurableNoSetDefaults k; - ariles_tests::ConfigurablePointers l; - ariles_tests::ConfigurableAutoDeclare m; - ariles_tests::ConfigurableVerbose p; - ariles_tests::ConfigurableSpecialFloats q; - ariles_tests::ConfigurableStrictness1 r; - ariles_tests::ConfigurableStrictness2 s; - ariles_tests::ConfigurableAny t; - ariles_tests::ConfigurablePointersScalar u; + const ariles_tests::ConfigurableComplex a; + const ariles_tests::ConfigurableComplexVerbose b; + const ariles_tests::ConfigurableEmpty c; + const ariles_tests::ConfigurableFinalize d; + const ariles_tests::ConfigurableMember e; + const ariles_tests::ConfigurableBase f; + const ariles_tests::ConfigurableDerived g; + const ariles_tests::ConfigurableMinimal h{}; + const ariles_tests::ConfigurableNoSetDefaults k; + const ariles_tests::ConfigurablePointers l; + const ariles_tests::ConfigurableAutoDeclare m; + const ariles_tests::ConfigurableVerbose p; + const ariles_tests::ConfigurableSpecialFloats q; + const ariles_tests::ConfigurableStrictness1 r; + const ariles_tests::ConfigurableStrictness2 s; + const ariles_tests::ConfigurableAny t; + const ariles_tests::ConfigurablePointersScalar u; return (0); } diff --git a/tests/api_v2/regression_test_223.cpp b/tests/api_v2/regression_test_223.cpp index c7b05da7..19fca43b 100644 --- a/tests/api_v2/regression_test_223.cpp +++ b/tests/api_v2/regression_test_223.cpp @@ -76,24 +76,22 @@ namespace ariles_tests t_Configurable configurable; - BOOST_CHECK_NO_THROW( - { - typename t_Visitor::Writer::Parameters parameters; - parameters.write_.fallback_to_string_floats_ = false; - typename t_Visitor::Writer writer("configurable.cfg"); - ariles2::apply(writer, configurable, parameters); - }); + BOOST_CHECK_NO_THROW({ + typename t_Visitor::Writer::Parameters parameters; + parameters.write_.fallback_to_string_floats_ = false; + typename t_Visitor::Writer writer("configurable.cfg"); + ariles2::apply(writer, configurable, parameters); + }); - BOOST_CHECK_EQUAL(0, system("cmp configurable.cfg regression_test_223_float.json")); + BOOST_CHECK_EQUAL(0, system("cmp configurable.cfg regression_test_223_float.json")); // NOLINT - BOOST_CHECK_NO_THROW( - { - typename t_Visitor::Writer writer("configurable.cfg"); - ariles2::apply(writer, configurable); - }); + BOOST_CHECK_NO_THROW({ + typename t_Visitor::Writer writer("configurable.cfg"); + ariles2::apply(writer, configurable); + }); - BOOST_CHECK_EQUAL(0, system("cmp configurable.cfg regression_test_223_string.json")); + BOOST_CHECK_EQUAL(0, system("cmp configurable.cfg regression_test_223_string.json")); // NOLINT } }; } // namespace ariles_tests diff --git a/tests/api_v2/regression_test_224.cpp b/tests/api_v2/regression_test_224.cpp index 13ae324d..2cbdaa54 100644 --- a/tests/api_v2/regression_test_224.cpp +++ b/tests/api_v2/regression_test_224.cpp @@ -36,6 +36,8 @@ namespace ariles_tests std::string type; std::map remappings; + + virtual ~SubstateParams() = default; }; struct StateMachineParams : public ariles2::RelaxedSloppyBase @@ -44,6 +46,8 @@ namespace ariles_tests #include ARILES2_INITIALIZE std::map substates; + + virtual ~StateMachineParams() = default; }; } // namespace ariles_tests diff --git a/tests/api_v2/testlib1.cpp b/tests/api_v2/testlib1.cpp index e89c91e2..67cbad0d 100644 --- a/tests/api_v2/testlib1.cpp +++ b/tests/api_v2/testlib1.cpp @@ -43,6 +43,9 @@ namespace testlib_1 } + virtual ~ConfigurableVerbose() = default; + + void arilesVisit(const ariles2::Defaults & /*visitor*/, const ariles2::Defaults::Parameters & /*param*/) { integer_ = 10; diff --git a/tests/api_v2/testlib2.cpp b/tests/api_v2/testlib2.cpp index aa954793..9d4c35a9 100644 --- a/tests/api_v2/testlib2.cpp +++ b/tests/api_v2/testlib2.cpp @@ -42,6 +42,8 @@ namespace testlib_2 ariles2::apply(*this); } + virtual ~ConfigurableVerbose() = default; + void arilesVisit(const ariles2::Defaults & /*visitor*/, const ariles2::Defaults::Parameters & /*param*/) {