Skip to content

Commit

Permalink
Keep linters happy.
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <[email protected]>
  • Loading branch information
MiguelCompany committed Jan 22, 2021
1 parent 22024c4 commit 1199639
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
13 changes: 6 additions & 7 deletions rmw_fastrtps_cpp/src/type_support_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <string>

#include <fastcdr/exceptions/Exception.h>

#include <string>

#include "rmw/error_handling.h"

#include "type_support_common.hpp"
Expand Down Expand Up @@ -93,19 +93,18 @@ bool TypeSupport::deserializeROSmessage(
try {
// Deserialize encapsulation.
deser.read_encapsulation();

// If type is not empty, deserialize message
if (has_data_) {
auto callbacks = static_cast<const message_type_support_callbacks_t *>(impl);
return callbacks->cdr_deserialize(deser, ros_message);
return callbacks->cdr_deserialize(deser, ros_message);
}

// Otherwise, consume dummy byte
uint8_t dump = 0;
deser >> dump;
(void)dump;
}
catch(const eprosima::fastcdr::exception::Exception&) {
} catch(const eprosima::fastcdr::exception::Exception&) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ bool TypeSupport<MembersType>::deserializeROSmessage(
try {
// Deserialize encapsulation.
deser.read_encapsulation();

(void)impl;
if (members_->member_count_ != 0) {
return TypeSupport::deserializeROSmessage(deser, members_, ros_message);
Expand All @@ -954,8 +954,7 @@ bool TypeSupport<MembersType>::deserializeROSmessage(
uint8_t dump = 0;
deser >> dump;
(void)dump;
}
catch(const eprosima::fastcdr::exception::Exception&) {
} catch(const eprosima::fastcdr::exception::Exception&) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion rmw_fastrtps_shared_cpp/src/rmw_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ __rmw_take_request(
eprosima::fastcdr::Cdr deser(*request.buffer_, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
eprosima::fastcdr::Cdr::DDS_CDR);
if (info->request_type_support_->deserializeROSmessage(
deser, ros_request, info->request_type_support_impl_))
deser, ros_request, info->request_type_support_impl_))
{
// Get header
rmw_fastrtps_shared_cpp::copy_from_fastrtps_guid_to_byte_array(
Expand Down
3 changes: 2 additions & 1 deletion rmw_fastrtps_shared_cpp/src/rmw_response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ __rmw_take_response(
eprosima::fastcdr::Cdr::DEFAULT_ENDIAN,
eprosima::fastcdr::Cdr::DDS_CDR);
if (info->response_type_support_->deserializeROSmessage(
deser, ros_response, info->response_type_support_impl_)) {
deser, ros_response, info->response_type_support_impl_))
{
request_header->source_timestamp = response.sample_info_.sourceTimestamp.to_ns();
request_header->received_timestamp = response.sample_info_.receptionTimestamp.to_ns();
request_header->request_id.sequence_number =
Expand Down

0 comments on commit 1199639

Please sign in to comment.