From d8e43c1f9577689dadce19614d81147117424e3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sascha=20K=C3=BChl?= Date: Thu, 17 Jul 2025 22:45:27 +0200 Subject: [PATCH] removed obsolete parameter from basic_object_info constructor --- include/matador/object/basic_object_info.hpp | 6 +++--- include/matador/object/object_info.hpp | 11 +++++------ include/matador/object/relation_completer.hpp | 2 +- include/matador/sql/abstract_sql_logger.hpp | 2 +- source/core/object/basic_object_info.cpp | 3 --- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/include/matador/object/basic_object_info.hpp b/include/matador/object/basic_object_info.hpp index 806ba41..442d929 100644 --- a/include/matador/object/basic_object_info.hpp +++ b/include/matador/object/basic_object_info.hpp @@ -49,9 +49,9 @@ public: [[nodiscard]] bool endpoints_empty() const; protected: - basic_object_info(std::shared_ptr node, std::type_index type_index, utils::identifier &&pk, const std::shared_ptr &pk_column, object_definition &&definition); - basic_object_info(std::shared_ptr node, std::type_index type_index, utils::identifier &&pk, const std::shared_ptr &pk_column); - basic_object_info(std::shared_ptr node, std::type_index type_index, object_definition &&definition); + basic_object_info(std::shared_ptr node, utils::identifier &&pk, const std::shared_ptr &pk_column, object_definition &&definition); + basic_object_info(std::shared_ptr node, utils::identifier &&pk, const std::shared_ptr &pk_column); + basic_object_info(std::shared_ptr node, object_definition &&definition); protected: std::shared_ptr node_; /**< prototype node of the represented object type */ diff --git a/include/matador/object/object_info.hpp b/include/matador/object/object_info.hpp index eba9bdf..6a7d709 100644 --- a/include/matador/object/object_info.hpp +++ b/include/matador/object/object_info.hpp @@ -14,14 +14,14 @@ public: object_info(const std::shared_ptr& node, const std::shared_ptr &ref_column) - : basic_object_info(node, typeid(Type), {}, ref_column, {}) + : basic_object_info(node, {}, ref_column, {}) , creator_([]{return std::make_unique(); }){ } object_info(const std::shared_ptr& node, utils::identifier &&pk, const std::shared_ptr &ref_column, object_definition &&definition) - : basic_object_info(node, typeid(Type), std::move(pk), ref_column, std::move(definition)) + : basic_object_info(node, std::move(pk), ref_column, std::move(definition)) , creator_([]{return std::make_unique(); }){ } object_info(const std::shared_ptr& node, @@ -29,13 +29,13 @@ public: const std::shared_ptr &ref_column, object_definition &&definition, create_func&& creator) - : basic_object_info(node, typeid(Type), std::move(pk), ref_column, std::move(definition)) + : basic_object_info(node, std::move(pk), ref_column, std::move(definition)) , creator_(std::move(creator)){ } object_info(const std::shared_ptr& node, object_definition &&definition, create_func&& creator) - : basic_object_info(node, typeid(Type), std::move(definition)) + : basic_object_info(node, std::move(definition)) , creator_(std::move(creator)){ } @@ -51,8 +51,7 @@ template using object_info_ref = std::reference_wrapper>; namespace detail { -struct null_type { -}; +struct null_type {}; } using null_info = object_info; diff --git a/include/matador/object/relation_completer.hpp b/include/matador/object/relation_completer.hpp index 338d77c..26c1a35 100644 --- a/include/matador/object/relation_completer.hpp +++ b/include/matador/object/relation_completer.hpp @@ -43,7 +43,7 @@ public: static void on_has_one(const char * /*id*/, ForeignPointerType &/*obj*/, const utils::foreign_attributes &/*attr*/) {} template - static void on_has_many(const char *id, CollectionType &, const char *join_column, const utils::foreign_attributes &attr) {} + static void on_has_many(const char * /*id*/, CollectionType &, const char * /*join_column*/, const utils::foreign_attributes &/*attr*/) {} template static void on_has_many_to_many(const char * /*id*/, CollectionType &/*collection*/, const char * /*join_column*/, const char * /*inverse_join_column*/, const utils::foreign_attributes &/*attr*/) {} diff --git a/include/matador/sql/abstract_sql_logger.hpp b/include/matador/sql/abstract_sql_logger.hpp index 5922905..4b5c657 100644 --- a/include/matador/sql/abstract_sql_logger.hpp +++ b/include/matador/sql/abstract_sql_logger.hpp @@ -86,7 +86,7 @@ public: /** * No logging on a select-statement. */ - void on_fetch( const std::string& stmt ) override { } + void on_fetch( const std::string& ) override { } /** * No logging on preparing a statement. diff --git a/source/core/object/basic_object_info.cpp b/source/core/object/basic_object_info.cpp index 8187dee..2af8584 100644 --- a/source/core/object/basic_object_info.cpp +++ b/source/core/object/basic_object_info.cpp @@ -6,7 +6,6 @@ namespace matador::object { basic_object_info::basic_object_info(std::shared_ptr node, - const std::type_index type_index, utils::identifier &&pk, const std::shared_ptr &pk_column, object_definition &&definition) @@ -17,7 +16,6 @@ basic_object_info::basic_object_info(std::shared_ptr node, } basic_object_info::basic_object_info(std::shared_ptr node, - const std::type_index type_index, utils::identifier &&pk, const std::shared_ptr &pk_column) : node_(std::move(node)) @@ -26,7 +24,6 @@ basic_object_info::basic_object_info(std::shared_ptr node, } basic_object_info::basic_object_info(std::shared_ptr node, - const std::type_index type_index, object_definition &&definition) : node_(std::move(node)) , definition_(std::move(definition)) {}