Skip to content

Commit

Permalink
info: static_assert has two arguments with C++11
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes committed Jan 8, 2019
1 parent 8da2fe5 commit 47c925f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/info/info_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ void InfoImpl::process_autopilot_version(const mavlink_message_t &message)
const char *product_name = product_id_str(autopilot_version.product_id);
STRNCPY(_product.product_name, product_name, sizeof(_product.product_name) - 1);

static_assert(sizeof(_identification.hardware_uid) == sizeof(autopilot_version.uid2));
static_assert(sizeof(_identification.hardware_uid) == sizeof(autopilot_version.uid2),
"UID length mismatch");
std::memcpy(
_identification.hardware_uid, autopilot_version.uid2, sizeof(autopilot_version.uid2));

Expand Down

0 comments on commit 47c925f

Please sign in to comment.