mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-28 19:44:07 +08:00
Renamed AssertDynamicallyAllocatable --> IsDynamicallyAllocatable
This commit is contained in:
parent
f91d8090c9
commit
fb0f44c4b4
@ -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];
|
||||
|
||||
template <typename T>
|
||||
struct AssertDynamicallyAllocatable
|
||||
struct IsDynamicallyAllocatable
|
||||
{
|
||||
static void check() { StaticAssert<sizeof(T) <= MEM_POOL_BLOCK_SIZE>::check(); }
|
||||
};
|
||||
|
||||
@ -45,7 +45,7 @@ public:
|
||||
, qos(uint8_t(qos))
|
||||
{
|
||||
assert(qos == VOLATILE || qos == PERSISTENT);
|
||||
AssertDynamicallyAllocatable<Entry>::check();
|
||||
IsDynamicallyAllocatable<Entry>::check();
|
||||
}
|
||||
|
||||
bool isExpired(uint64_t monotonic_timestamp) const { return monotonic_timestamp > monotonic_deadline; }
|
||||
|
||||
@ -87,7 +87,7 @@ private:
|
||||
|
||||
StorageEntryGroup()
|
||||
{
|
||||
AssertDynamicallyAllocatable<StorageEntryGroup>::check();
|
||||
IsDynamicallyAllocatable<StorageEntryGroup>::check();
|
||||
StaticAssert<NUM_ENTRIES >= 2>::check();
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user