Test Circular Buffer
This commit is contained in:
@@ -11,6 +11,14 @@ namespace JabyEngine {
|
||||
constexpr ArrayRange() = default;
|
||||
constexpr ArrayRange(T* start, size_t size) : start(start), size(size) {
|
||||
}
|
||||
|
||||
constexpr T& operator[](size_t idx) {
|
||||
return this->start[idx];
|
||||
}
|
||||
|
||||
constexpr const T& operator[](size_t idx) const {
|
||||
return this->start[idx];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,7 @@ namespace JabyEngine {
|
||||
public:
|
||||
FastCircularBuffer() = default;
|
||||
|
||||
void setup(T* buffer_start_adr, size_t element_count) {
|
||||
void setup(T* buffer_start_adr) {
|
||||
this->start_adr = buffer_start_adr;
|
||||
this->read_idx = 0;
|
||||
this->write_idx = 0;
|
||||
|
Reference in New Issue
Block a user