AP_Common: correct type conversion issues in _assert_storage_size

This commit is contained in:
Peter Barker 2019-04-04 10:15:26 +11:00 committed by Tom Pittenger
parent a87d388a6c
commit a6755b6406
1 changed files with 2 additions and 2 deletions

View File

@ -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;
};