mirror of https://github.com/ARMmbed/mbed-os.git
add missing asserts to UserAllocatedEvent class
Improves code quality by adding MBED_ASSERT to UserAllocatedEvent::delay and UserAllocatedEvent::period function. This prevent changing already posted event.pull/11446/head
parent
1800632655
commit
f5f174474b
|
@ -215,6 +215,7 @@ public:
|
|||
*/
|
||||
void delay(int delay)
|
||||
{
|
||||
MBED_ASSERT(!_post_ref);
|
||||
equeue_event_delay(&_e + 1, delay);
|
||||
}
|
||||
|
||||
|
@ -224,6 +225,7 @@ public:
|
|||
*/
|
||||
void period(int period)
|
||||
{
|
||||
MBED_ASSERT(!_post_ref);
|
||||
equeue_event_period(&_e + 1, period);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue