code style only: wrap after open parenthesis if not in one line (#95)
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
This commit is contained in:
parent
0bc1281978
commit
1c500379ae
5 changed files with 124 additions and 101 deletions
|
@ -368,15 +368,17 @@ inline void deserialize_field<std::string>(
|
|||
deser >> cpp_string_vector;
|
||||
|
||||
auto & string_array_field = *reinterpret_cast<rosidl_generator_c__String__Sequence *>(field);
|
||||
if (!rosidl_generator_c__String__Sequence__init(&string_array_field,
|
||||
cpp_string_vector.size()))
|
||||
if (
|
||||
!rosidl_generator_c__String__Sequence__init(
|
||||
&string_array_field, cpp_string_vector.size()))
|
||||
{
|
||||
throw std::runtime_error("unable to initialize rosidl_generator_c__String array");
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < cpp_string_vector.size(); ++i) {
|
||||
if (!rosidl_generator_c__String__assign(&string_array_field.data[i],
|
||||
cpp_string_vector[i].c_str()))
|
||||
if (
|
||||
!rosidl_generator_c__String__assign(
|
||||
&string_array_field.data[i], cpp_string_vector[i].c_str()))
|
||||
{
|
||||
throw std::runtime_error("unable to assign rosidl_generator_c__String");
|
||||
}
|
||||
|
|
|
@ -185,7 +185,8 @@ public:
|
|||
pos += sizeof(T); \
|
||||
} \
|
||||
} else { \
|
||||
memcpy(reinterpret_cast<void *>(x), reinterpret_cast<const void *>(data + pos), \
|
||||
memcpy( \
|
||||
reinterpret_cast<void *>(x), reinterpret_cast<const void *>(data + pos), \
|
||||
cnt * sizeof(T)); \
|
||||
pos += cnt * sizeof(T); \
|
||||
} \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue