Browse Source

AP_Common: correct type conversion issues in _assert_storage_size

mission-4.1.18
Peter Barker 6 years ago committed by Tom Pittenger
parent
commit
a6755b6406
  1. 4
      libraries/AP_Common/AP_Common.h

4
libraries/AP_Common/AP_Common.h

@ -114,10 +114,10 @@ @@ -114,10 +114,10 @@
// templates are used for this because the compiler's output will
// usually contain details of the template instantiation so you can
// see how the actual size differs from the expected size.
template<typename s, int s_size, int t> struct _assert_storage_size {
template<typename s, size_t s_size, size_t t> struct _assert_storage_size {
static_assert(s_size == t, "wrong size");
};
template<typename s, int t> struct assert_storage_size {
template<typename s, size_t t> struct assert_storage_size {
_assert_storage_size<s, sizeof(s), t> _member;
};

Loading…
Cancel
Save