Accept T as copy instead of referende
xQueueSend() copies the value, so accepting a reference is misleading
This commit is contained in:
parent
428a0f437f
commit
96c39d4792
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ public:
|
||||||
size_t size() { return uxQueueMessagesWaiting(handle); }
|
size_t size() { return uxQueueMessagesWaiting(handle); }
|
||||||
size_t available() { return uxQueueSpacesAvailable(handle); }
|
size_t available() { return uxQueueSpacesAvailable(handle); }
|
||||||
size_t capacity() { return queueCapacity; }
|
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;
|
return xQueueSend(handle, &item, ticksToWait) == pdTRUE;
|
||||||
}
|
}
|
||||||
etl::optional<T> pop(const TickType_t ticksToWait = portMAX_DELAY) {
|
etl::optional<T> pop(const TickType_t ticksToWait = portMAX_DELAY) {
|
||||||
|
|
Reference in a new issue