From e49f544d55ab6bddf70022f43453854996d70bc0 Mon Sep 17 00:00:00 2001 From: JLBuenoLopez-eProsima Date: Mon, 25 Mar 2024 14:17:55 +0100 Subject: [PATCH] Refs #20335: apply review suggestions Signed-off-by: JLBuenoLopez-eProsima --- src/cpp/fastdds/topic/DDSSQLFilter/DDSFilterFactory.cpp | 4 ++-- .../xtypes/dynamic_types/DynamicTypeBuilderFactoryImpl.cpp | 2 -- .../fastdds/xtypes/dynamic_types/DynamicTypeBuilderImpl.cpp | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/cpp/fastdds/topic/DDSSQLFilter/DDSFilterFactory.cpp b/src/cpp/fastdds/topic/DDSSQLFilter/DDSFilterFactory.cpp index c9dc8a79129..71bb6ab491c 100644 --- a/src/cpp/fastdds/topic/DDSSQLFilter/DDSFilterFactory.cpp +++ b/src/cpp/fastdds/topic/DDSSQLFilter/DDSFilterFactory.cpp @@ -202,7 +202,7 @@ static DDSFilterPredicate::OperationKind get_predicate_op( struct ExpressionParsingState { - const std::shared_ptr& type_object; + const std::shared_ptr type_object; const IContentFilterFactory::ParameterSeq& filter_parameters; DDSFilterExpression* filter; }; @@ -538,7 +538,7 @@ ReturnCode_t DDSFilterFactory::create_content_filter( { DynamicType::_ref_type dyn_type = DynamicTypeBuilderFactory::get_instance()->create_type_w_type_object( type_objects->complete_type_object)->build(); - if (nullptr != dyn_type) + if (dyn_type) { DDSFilterExpression* expr = get_expression(); expr->set_type(dyn_type); diff --git a/src/cpp/fastdds/xtypes/dynamic_types/DynamicTypeBuilderFactoryImpl.cpp b/src/cpp/fastdds/xtypes/dynamic_types/DynamicTypeBuilderFactoryImpl.cpp index 700bd8b30e9..2b1df2c7076 100644 --- a/src/cpp/fastdds/xtypes/dynamic_types/DynamicTypeBuilderFactoryImpl.cpp +++ b/src/cpp/fastdds/xtypes/dynamic_types/DynamicTypeBuilderFactoryImpl.cpp @@ -14,9 +14,7 @@ #include "DynamicTypeBuilderFactoryImpl.hpp" -#include #include -#include #include #include diff --git a/src/cpp/fastdds/xtypes/dynamic_types/DynamicTypeBuilderImpl.cpp b/src/cpp/fastdds/xtypes/dynamic_types/DynamicTypeBuilderImpl.cpp index 417e77a305c..d78ad6d5fdf 100644 --- a/src/cpp/fastdds/xtypes/dynamic_types/DynamicTypeBuilderImpl.cpp +++ b/src/cpp/fastdds/xtypes/dynamic_types/DynamicTypeBuilderImpl.cpp @@ -203,7 +203,8 @@ bool DynamicTypeBuilderImpl::equals( } } - if (verbatim_.size() == impl->verbatim_.size()) + ret_value &= verbatim_.size() == impl->verbatim_.size(); + if (ret_value) { for (size_t count {0}; ret_value && count < verbatim_.size(); ++count) {