@@ -63,14 +63,14 @@ class AtomicRingBuffer : public Immovable<AtomicRingBuffer<Tp>> {
6363 // / @param bottom 当前队尾位置
6464 // / @param top 当前队头位置
6565 // / @return 新缓冲区指针
66- [[nodiscard]] TFL_FORCE_INLINE AtomicRingBuffer* resize (std::int64_t bottom, std::int64_t top) const ;
66+ [[nodiscard]] TFL_FORCE_INLINE AtomicRingBuffer* resize (std::int64_t bottom, std::int64_t top) const ; // NOLINT(bugprone-easily-swappable-parameters)
6767
6868 // / @brief 扩容:创建足够容纳额外元素的新缓冲区
6969 // / @param bottom 当前队尾位置
7070 // / @param top 当前队头位置
7171 // / @param n 额外需要容纳的元素数量
7272 // / @return 新缓冲区指针
73- [[nodiscard]] TFL_FORCE_INLINE AtomicRingBuffer* resize (std::int64_t bottom, std::int64_t top, std::size_t n) const ;
73+ [[nodiscard]] TFL_FORCE_INLINE AtomicRingBuffer* resize (std::int64_t bottom, std::int64_t top, std::size_t n) const ; // NOLINT(bugprone-easily-swappable-parameters)
7474
7575private:
7676 std::int64_t m_cap; // /< 实际容量(2 的倍数)
@@ -93,7 +93,7 @@ class UnboundedQueue : public Immovable<UnboundedQueue<Tp>> {
9393
9494 // / @brief 构造函数,创建指定初始容量的队列
9595 // / @param cap 初始容量(默认 2 倍默认队列大小)
96- explicit UnboundedQueue (std::int64_t cap = 2 * TFL_DEFAULT_QUEUE_SIZE );
96+ explicit UnboundedQueue (std::int64_t cap = 2LL * TFL_DEFAULT_QUEUE_SIZE );
9797
9898 // / @brief 析构函数,释放当前缓冲区和历史缓冲区
9999 ~UnboundedQueue () noexcept ;
@@ -186,7 +186,7 @@ TFL_FORCE_INLINE Tp AtomicRingBuffer<Tp>::load(std::int64_t index) const noexcep
186186
187187template <typename Tp>
188188 requires std::is_pointer_v<Tp>
189- TFL_FORCE_INLINE AtomicRingBuffer<Tp>* AtomicRingBuffer<Tp>::resize(
189+ TFL_FORCE_INLINE AtomicRingBuffer<Tp>* AtomicRingBuffer<Tp>::resize( // NOLINT(bugprone-easily-swappable-parameters)
190190 std::int64_t bottom, std::int64_t top) const {
191191 auto * ptr = new AtomicRingBuffer{2 * m_cap};
192192 for (std::int64_t i = top; i != bottom; ++i) {
@@ -197,7 +197,7 @@ TFL_FORCE_INLINE AtomicRingBuffer<Tp>* AtomicRingBuffer<Tp>::resize(
197197
198198template <typename Tp>
199199 requires std::is_pointer_v<Tp>
200- TFL_FORCE_INLINE AtomicRingBuffer<Tp>* AtomicRingBuffer<Tp>::resize(
200+ TFL_FORCE_INLINE AtomicRingBuffer<Tp>* AtomicRingBuffer<Tp>::resize( // NOLINT(bugprone-easily-swappable-parameters)
201201 std::int64_t bottom, std::int64_t top, std::size_t n) const {
202202 // 确保新容量为 2 的幂次方且足够容纳现有元素 + 新增元素
203203 std::int64_t const new_cap = std::bit_ceil (m_cap + n);
0 commit comments