Skip to content

Commit

Permalink
Uncrustify
Browse files Browse the repository at this point in the history
Signed-off-by: Irene Bandera <[email protected]>
  • Loading branch information
irenebm committed Nov 6, 2023
1 parent 27db9d6 commit a932bd9
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 36 deletions.
10 changes: 7 additions & 3 deletions fastddsspy_participants/src/cpp/visualization/ModelParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ void add_endpoint_to_vector(
// If first for this topic, add new topic
already_endpoints_index[endpoint.second.topic.m_topic_name] = endpoints.size();
endpoints.push_back({
ros2_types ? utils::demangle_if_ros_topic(endpoint.second.topic.m_topic_name) : endpoint.second.topic.m_topic_name,
ros2_types ? utils::demangle_if_ros_topic(
endpoint.second.topic.m_topic_name) : endpoint.second.topic.m_topic_name,
ros2_types ? utils::demangle_if_ros_type(
endpoint.second.topic.type_name) : endpoint.second.topic.type_name,
1
Expand Down Expand Up @@ -160,7 +161,8 @@ SimpleEndpointData fill_simple_endpoint(
endpoint.guid,
participant_name,
{
model.get_ros2_types() ? utils::demangle_if_ros_topic(endpoint.topic.m_topic_name) : endpoint.topic.m_topic_name,
model.get_ros2_types() ? utils::demangle_if_ros_topic(endpoint.topic.m_topic_name) : endpoint.topic.
m_topic_name,
model.get_ros2_types() ? utils::demangle_if_ros_type(endpoint.topic.type_name) : endpoint.topic.type_name
}
};
Expand All @@ -174,7 +176,9 @@ void fill_complex_endpoint(
result.participant_name = get_participant_name(model, endpoint.guid);

result.guid = endpoint.guid;
result.topic.topic_name = model.get_ros2_types() ? utils::demangle_if_ros_topic(endpoint.topic.m_topic_name) : endpoint.topic.m_topic_name;
result.topic.topic_name =
model.get_ros2_types() ? utils::demangle_if_ros_topic(endpoint.topic.m_topic_name) : endpoint.
topic.m_topic_name;
result.topic.topic_type =
model.get_ros2_types() ? utils::demangle_if_ros_type(endpoint.topic.type_name) : endpoint.topic.
type_name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ HelloWorld::HelloWorld(
}

HelloWorld::HelloWorld(
HelloWorld&& x) noexcept
HelloWorld&& x) noexcept
{
m_index = x.m_index;
m_message = std::move(x.m_message);
Expand Down Expand Up @@ -208,7 +208,6 @@ std::array<char, 20>& HelloWorld::message()
return m_message;
}


size_t HelloWorld::getKeyMaxCdrSerializedSize(
size_t current_alignment)
{
Expand All @@ -226,4 +225,3 @@ void HelloWorld::serializeKey(
{
(void) scdr;
}

Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ class HelloWorld
eProsima_user_DllExport std::array<char, 20>& message();

/*!
* @brief This function returns the maximum serialized size of an object
* depending on the buffer alignment.
* @param current_alignment Buffer alignment.
* @return Maximum serialized size.
*/
* @brief This function returns the maximum serialized size of an object
* depending on the buffer alignment.
* @param current_alignment Buffer alignment.
* @return Maximum serialized size.
*/
eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
size_t current_alignment = 0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ bool HelloWorldPubSubType::deserialize(
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload->data), payload->length);

// Object that deserializes the data.
eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR);
eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
eprosima::fastcdr::Cdr::DDS_CDR);

// Deserialize encapsulation.
deser.read_encapsulation();
Expand Down Expand Up @@ -167,4 +168,3 @@ bool HelloWorldPubSubType::getKey(
}
return true;
}

Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,34 @@
#ifndef SWIG
namespace detail {

template<typename Tag, typename Tag::type M>
struct HelloWorld_rob
{
friend constexpr typename Tag::type get(
Tag)
{
return M;
}
};

struct HelloWorld_f
template<typename Tag, typename Tag::type M>
struct HelloWorld_rob
{
friend constexpr typename Tag::type get(
Tag)
{
typedef std::array<char, 20> HelloWorld::* type;
friend constexpr type get(
HelloWorld_f);
};
return M;
}

template struct HelloWorld_rob<HelloWorld_f, &HelloWorld::m_message>;
};

template <typename T, typename Tag>
inline size_t constexpr HelloWorld_offset_of() {
return ((::size_t) &reinterpret_cast<char const volatile&>((((T*)0)->*get(Tag()))));
}
struct HelloWorld_f
{
typedef std::array<char, 20> HelloWorld::* type;
friend constexpr type get(
HelloWorld_f);
};

template struct HelloWorld_rob<HelloWorld_f, &HelloWorld::m_message>;

template <typename T, typename Tag>
inline size_t constexpr HelloWorld_offset_of()
{
return ((::size_t) &reinterpret_cast<char const volatile&>((((T*)0)->*get(Tag()))));
}
#endif

} // namespace detail
#endif // ifndef SWIG

/*!
* @brief This class represents the TopicDataType of the type HelloWorld defined by the user in the IDL file.
Expand Down Expand Up @@ -132,9 +135,12 @@ class HelloWorldPubSubType : public eprosima::fastdds::dds::TopicDataType

static constexpr bool is_plain_impl()
{
return 24ULL == (detail::HelloWorld_offset_of<HelloWorld, detail::HelloWorld_f>() + sizeof(std::array<char, 20>));
return 24ULL ==
(detail::HelloWorld_offset_of<HelloWorld, detail::HelloWorld_f>() + sizeof(std::array<char, 20>));

}

}};
};

#endif // _FAST_DDS_GENERATED_HELLOWORLD_PUBSUBTYPES_H_

0 comments on commit a932bd9

Please sign in to comment.