Skip to content

Commit

Permalink
Refs #20424. Apply suggestions 1
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
richiware committed Apr 12, 2024
1 parent 8f3b43f commit 2a37cf6
Show file tree
Hide file tree
Showing 3 changed files with 691 additions and 654 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class DynamicTypeBuilderFactory : public std::enable_shared_from_this<DynamicTyp
* Creates a new @ref DynamicTypeBuilder reference representing a bounded string type.
* @param[in] bound `uint32_t` representing the maximum number of elements that may be stored.
* If the value is equal to LENGTH_UNLIMITED, the string type shall be considered to be unbounded.
* @return new @ref DynamicTypeBuilder reference.. Nil reference returned in error case.
* @return new @ref DynamicTypeBuilder reference.
*/
FASTDDS_EXPORTED_API virtual traits<DynamicTypeBuilder>::ref_type create_string_type(
uint32_t bound) = 0;
Expand All @@ -98,7 +98,7 @@ class DynamicTypeBuilderFactory : public std::enable_shared_from_this<DynamicTyp
* Creates a new @ref DynamicTypeBuilder reference representing a bounded wstring type.
* @param[in] bound `uint32_t` representing the maximum number of elements that may be stored.
* If the value is equal to LENGTH_UNLIMITED, the wstring type shall be considered to be unbounded.
* @return new @ref DynamicTypeBuilder reference.. Nil reference returned in error case.
* @return new @ref DynamicTypeBuilder reference.
*/
FASTDDS_EXPORTED_API virtual traits<DynamicTypeBuilder>::ref_type create_wstring_type(
uint32_t bound) = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "DynamicTypeBuilderFactoryImpl.hpp"

#include <cassert>
#include <ios>
#include <sstream>
#include <string>
Expand Down Expand Up @@ -260,12 +261,8 @@ traits<DynamicTypeBuilder>::ref_type DynamicTypeBuilderFactoryImpl::create_strin
ret_val->get_descriptor().element_type(char8_type_);
ret_val->get_descriptor().bound().push_back(bound);

if (ret_val->get_descriptor().is_consistent())
{
return ret_val;
}

return {};
assert(ret_val->get_descriptor().is_consistent());
return ret_val;
}

traits<DynamicTypeBuilder>::ref_type DynamicTypeBuilderFactoryImpl::create_wstring_type(
Expand All @@ -276,12 +273,8 @@ traits<DynamicTypeBuilder>::ref_type DynamicTypeBuilderFactoryImpl::create_wstri
ret_val->get_descriptor().element_type(char16_type_);
ret_val->get_descriptor().bound().push_back(bound);

if (ret_val->get_descriptor().is_consistent())
{
return ret_val;
}

return {};
assert(ret_val->get_descriptor().is_consistent());
return ret_val;
}

//}}}
Expand Down
Loading

0 comments on commit 2a37cf6

Please sign in to comment.