TypedQueue: make functions return bools instead of BaseType_t

Minor cleanup to hide away some FreeRTOS bits.

Note: I believe src/CustomRF95.cpp:62 had a bug where it had the
condition inverted.
This commit is contained in:
Girts Folkmanis
2020-03-15 17:52:01 -07:00
parent 90ecdf229e
commit 7a4a1af332
5 changed files with 23 additions and 24 deletions

View File

@@ -18,7 +18,7 @@ public:
{
T *p;
return this->dequeue(&p, maxWait) == pdTRUE ? p : NULL;
return this->dequeue(&p, maxWait) ? p : nullptr;
}
// returns a ptr or null if the queue was empty
@@ -26,6 +26,6 @@ public:
{
T *p;
return this->dequeueFromISR(&p, higherPriWoken) == pdTRUE ? p : NULL;
return this->dequeueFromISR(&p, higherPriWoken) ? p : nullptr;
}
};