Accept T as copy instead of referende

xQueueSend() copies the value, so accepting a reference is misleading
This commit is contained in:
GHOSCHT 2023-03-25 18:09:11 +01:00
parent 415c5a04b1
commit 27ed5d0663

View file

@ -26,7 +26,7 @@ public:
size_t size() { return uxQueueMessagesWaiting(handle); }
size_t available() { return uxQueueSpacesAvailable(handle); }
size_t capacity() { return queueCapacity; }
bool push(const T &item, const TickType_t ticksToWait = portMAX_DELAY) {
bool push(const T item, const TickType_t ticksToWait = portMAX_DELAY) {
return xQueueSend(handle, &item, ticksToWait) == pdTRUE;
}
etl::optional<T> pop(const TickType_t ticksToWait = portMAX_DELAY) {