Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(agnocastlib): fix google-readability-casting #302

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Checks: "
-cppcoreguidelines-special-member-functions,

google-*,
-google-readability-casting,
-google-default-arguments,
-google-build-using-namespace,

Expand Down
3 changes: 2 additions & 1 deletion src/agnocastlib/src/agnocast_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ bool AgnocastExecutor::get_next_agnocast_executables(
exit(EXIT_FAILURE);
}

for (int32_t i = (int32_t)receive_args.ret_len - 1; i >= 0; i--) { // older messages first
for (int32_t i = static_cast<int32_t>(receive_args.ret_len) - 1; i >= 0;
i--) { // older messages first
const auto callable = agnocast::create_callable(
reinterpret_cast<void *>(receive_args.ret_last_msg_addrs[i]),
receive_args.ret_publisher_pids[i], receive_args.ret_timestamps[i], topic_local_id);
Expand Down
2 changes: 1 addition & 1 deletion src/agnocastlib/src/agnocast_subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ union ioctl_subscriber_args SubscriptionBase::initialize(bool is_take_sub)
}

for (uint32_t i = 0; i < subscriber_args.ret_publisher_num; i++) {
if ((pid_t)subscriber_args.ret_pids[i] == subscriber_pid_) {
if (static_cast<pid_t>(subscriber_args.ret_pids[i]) == subscriber_pid_) {
/*
* NOTE: In ROS2, communication should work fine even if the same process exists as both a
* publisher and a subscriber for a given topic. However, in Agnocast, to avoid applying
Expand Down
Loading