Skip to content

Commit 7064d0e

Browse files
aentingerfacchinm
authored andcommitted
Replace magic number for queue size with constexpr constant
1 parent 7f74d89 commit 7064d0e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Arduino_Threads.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ class Shared // template definition
4242
return peek();
4343
}
4444
private:
45+
static size_t constexpr QUEUE_SIZE = 16;
46+
4547
T val;
46-
rtos::MemoryPool<T, 16> memory_pool;
47-
rtos::Queue<T, 16> queue;
48+
rtos::MemoryPool<T, QUEUE_SIZE> memory_pool;
49+
rtos::Queue<T, QUEUE_SIZE> queue;
4850
};
4951

5052
#define CONCAT2(x,y) x##y

0 commit comments

Comments
 (0)