* @brief Constructs a FixedQueue with a given logical capacity. Backing storage * is rounded up to the next power of two for fast wrap-around. */
| 76 | * is rounded up to the next power of two for fast wrap-around. |
| 77 | */ |
| 78 | explicit FixedQueue(std::size_t capacity = 100) |
| 79 | : m_capacity(capacity < 1 ? 1 : capacity) |
| 80 | , m_storageCapacity(roundUpToPowerOfTwo(capacity < 1 ? 1 : capacity)) |
| 81 | , m_storageMask(m_storageCapacity - 1) |
| 82 | , m_data(makeStorage(m_storageCapacity)) |
| 83 | , m_start(0) |
| 84 | , m_size(0) |
| 85 | {} |
| 86 | |
| 87 | /** |
| 88 | * @brief Copy constructor. |
nothing calls this directly
no test coverage detected