Remove unnecessary ternary operator

This commit is contained in:
GHOSCHT 2023-03-30 20:08:25 +02:00
parent bca8a347ff
commit 2c6396fbf5
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View file

@ -14,11 +14,11 @@ auto freertos::BinarySemaphore::operator=(
}
auto freertos::BinarySemaphore::take(TickType_t timeout) -> bool {
BaseType_t success = xSemaphoreTake(handle, timeout);
return success == pdTRUE ? true : false;
return success == pdTRUE;
}
auto freertos::BinarySemaphore::give() -> bool {
BaseType_t success = xSemaphoreGive(handle);
return success == pdTRUE ? true : false;
return success == pdTRUE;
}
auto freertos::BinarySemaphore::getCount() -> size_t {

View file

@ -12,9 +12,9 @@ auto freertos::Mutex::operator=(const Mutex &&other) noexcept -> Mutex & {
}
auto freertos::Mutex::lock(TickType_t timeout) -> bool{
BaseType_t success = xSemaphoreTake(handle, timeout);
return success == pdTRUE ? true : false;
return success == pdTRUE;
}
auto freertos::Mutex::unlock() -> bool {
BaseType_t success = xSemaphoreGive(handle);
return success == pdTRUE ? true : false;
return success == pdTRUE;
}