| Line | Branch | Decision | Exec | Source |
|---|---|---|---|---|
| 1 | /* | |||
| 2 | * @file efi_output.cpp | |||
| 3 | * | |||
| 4 | */ | |||
| 5 | ||||
| 6 | #include "pch.h" | |||
| 7 | #include "efi_output.h" | |||
| 8 | ||||
| 9 | 3354 | bool SwitchedState::update(bool const newState) { | ||
| 10 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 3354 times.
|
1/2✗ Decision 'true' not taken.
✓ Decision 'false' taken 3354 times.
|
3354 | if (state == nullptr) { |
| 11 | ✗ | return false; | ||
| 12 | } | |||
| 13 | ||||
| 14 |
2/2✓ Branch 0 taken 5 times.
✓ Branch 1 taken 3349 times.
|
2/2✓ Decision 'true' taken 5 times.
✓ Decision 'false' taken 3349 times.
|
3354 | if (newState != *state) { |
| 15 |
1/2✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
|
5 | *state = newState ? 1 : 0; | |
| 16 | 5 | counter++; | ||
| 17 | 5 | return true; | ||
| 18 | } | |||
| 19 | ||||
| 20 | 3349 | return false; | ||
| 21 | } | |||
| 22 | ||||
| 23 | ✗ | uint16_t SwitchedState::getCounter() const { | ||
| 24 | ✗ | return counter; | ||
| 25 | } | |||
| 26 |