mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-04 02:41:36 +08:00
Renamed AssertDynamicallyAllocatable --> IsDynamicallyAllocatable
This commit is contained in:
@@ -25,7 +25,7 @@ enum { MEM_POOL_ALIGNMENT = 8 };
|
|||||||
typedef char _alignment_check_for_MEM_POOL_BLOCK_SIZE[((MEM_POOL_BLOCK_SIZE & (MEM_POOL_ALIGNMENT - 1)) == 0) ? 1 : -1];
|
typedef char _alignment_check_for_MEM_POOL_BLOCK_SIZE[((MEM_POOL_BLOCK_SIZE & (MEM_POOL_ALIGNMENT - 1)) == 0) ? 1 : -1];
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct AssertDynamicallyAllocatable
|
struct IsDynamicallyAllocatable
|
||||||
{
|
{
|
||||||
static void check() { StaticAssert<sizeof(T) <= MEM_POOL_BLOCK_SIZE>::check(); }
|
static void check() { StaticAssert<sizeof(T) <= MEM_POOL_BLOCK_SIZE>::check(); }
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
, qos(uint8_t(qos))
|
, qos(uint8_t(qos))
|
||||||
{
|
{
|
||||||
assert(qos == VOLATILE || qos == PERSISTENT);
|
assert(qos == VOLATILE || qos == PERSISTENT);
|
||||||
AssertDynamicallyAllocatable<Entry>::check();
|
IsDynamicallyAllocatable<Entry>::check();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isExpired(uint64_t monotonic_timestamp) const { return monotonic_timestamp > monotonic_deadline; }
|
bool isExpired(uint64_t monotonic_timestamp) const { return monotonic_timestamp > monotonic_deadline; }
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ private:
|
|||||||
|
|
||||||
StorageEntryGroup()
|
StorageEntryGroup()
|
||||||
{
|
{
|
||||||
AssertDynamicallyAllocatable<StorageEntryGroup>::check();
|
IsDynamicallyAllocatable<StorageEntryGroup>::check();
|
||||||
StaticAssert<NUM_ENTRIES >= 2>::check();
|
StaticAssert<NUM_ENTRIES >= 2>::check();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user