Accept T as copy instead of referende
xQueueSend() copies the value, so accepting a reference is misleading
This commit is contained in:
parent
415c5a04b1
commit
27ed5d0663
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue