Skip to content

Commit

Permalink
Merge pull request #21 from hideakitai/fix/invalid-conversion-from-ar…
Browse files Browse the repository at this point in the history
…ray-to-pointer

fix: invalid conversion from array to pointer
  • Loading branch information
hideakitai authored Jan 4, 2024
2 parents ee413bd + a113b2b commit f4acdbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ArxContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ class RingBuffer {
// it should point to the 1st item and have enough space for size() readings of items
// impossible with ringbuffer - either points to the 1st item or has enough space
// only exception when it works is when head_ pos == 0
const T* data() const { return &(queue_); }
T* data() { return &(queue_); }
const T* data() const { return reinterpret_cast<const T*>(&(queue_)); }
T* data() { return reinterpret_cast<T*>(&(queue_)); }
inline bool empty() const { return tail_ == head_; }
inline void clear() { head_ = tail_ = 0; }

Expand Down

0 comments on commit f4acdbb

Please sign in to comment.