Skip to content

Commit

Permalink
Workaround compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Timple authored and Rayman committed Dec 19, 2024
1 parent 6aa5583 commit 6b0efb7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/socketcan_bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ namespace nobleo_socketcan_bridge
{
std::ostream & operator<<(std::ostream & os, const can_msgs::msg::Frame & msg)
{
fmt::print(os, "{:0>3X} [{}]", msg.id, msg.dlc);
for (auto i = 0; i < msg.dlc; ++i) {
fmt::print(os, " {:0>2X}", msg.data[i]);
}
os << fmt::format(
"{:0>3X} [{}] {}", msg.id, msg.dlc,
fmt::join(msg.data.begin(), msg.data.begin() + msg.dlc, " "));
return os;
}

Expand Down

0 comments on commit 6b0efb7

Please sign in to comment.