Skip to content

Commit

Permalink
Fixed dependencies. Fixed fucntion name colision
Browse files Browse the repository at this point in the history
Signed-off-by: Gonzo de Pedro <[email protected]>
  • Loading branch information
gonzodepedro committed Dec 8, 2023
1 parent ab4a335 commit 33b5a4b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions rosidl_adapter_proto/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<exec_depend>rosidl_parser</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<member_of_group>rosidl_interface_packages</member_of_group>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,25 @@
#include "test_msgs/msg/unbounded_sequences__typeadapter_protobuf_cpp.hpp"
#include "test_msgs/msg/w_strings__typeadapter_protobuf_cpp.hpp"

// static inline std::string
// from_u8string(const std::string & s)
// {
// return s;
// }

// static inline std::string
// from_u8string(std::string && s)
// {
// return std::move(s);
// }

// #if defined(__cpp_lib_char8_t)
// static inline std::string
// from_u8string(const std::u8string & s)
// {
// return std::string(s.begin(), s.end());
// }
// #endif
static inline std::string
get_from_u8string(const std::string & s)
{
return s;
}

static inline std::string
get_from_u8string(std::string && s)
{
return std::move(s);
}

#if defined(__cpp_lib_char8_t)
static inline std::string
get_from_u8string(const std::u8string & s)
{
return std::string(s.begin(), s.end());
}
#endif

typedef std::shared_ptr<test_msgs::msg::pb::Empty> EmptySharedPtr;
typedef std::shared_ptr<test_msgs::msg::pb::BasicTypes> BasicTypesSharedPtr;
Expand Down Expand Up @@ -196,8 +196,8 @@ get_proto_messages_strings()
}
{
auto msg = std::make_shared<test_msgs::msg::pb::Strings>();
msg->set_string_value(from_u8string(u8"Hell\u00F6 W\u00F6rld!")); // using umlaut
msg->set_bounded_string_value(from_u8string(u8"Hell\u00F6 W\u00F6rld!")); // using umlaut
msg->set_string_value(get_from_u8string(u8"Hell\u00F6 W\u00F6rld!")); // using umlaut
msg->set_bounded_string_value(get_from_u8string(u8"Hell\u00F6 W\u00F6rld!")); // using umlaut
messages.push_back(msg);
}
{
Expand Down

0 comments on commit 33b5a4b

Please sign in to comment.