diff options
author | FormerLurker <hochgebe@gmail.com> | 2020-12-14 00:01:48 +0300 |
---|---|---|
committer | FormerLurker <hochgebe@gmail.com> | 2020-12-14 00:01:48 +0300 |
commit | ec309e86a5f64bbce182cbb32379e4c35ec18e3c (patch) | |
tree | 0f7641af347875a4f8eebcfe678c78bda211676f /GcodeProcessorLib/circular_buffer.h | |
parent | 893b8eea5e182457e90db9ddbaac8a7fb435a0c7 (diff) |
Resolves #22, #23, #24, #25 and #26.
Diffstat (limited to 'GcodeProcessorLib/circular_buffer.h')
-rw-r--r-- | GcodeProcessorLib/circular_buffer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/GcodeProcessorLib/circular_buffer.h b/GcodeProcessorLib/circular_buffer.h index 1658b78..0312a29 100644 --- a/GcodeProcessorLib/circular_buffer.h +++ b/GcodeProcessorLib/circular_buffer.h @@ -61,7 +61,7 @@ public: count_++; items_[front_index_] = object; } - T pop_front() + T& pop_front() { if (count_ == 0) { @@ -74,7 +74,7 @@ public: return items_[prev_start]; } - T get(int index) + T& get(int index) { return items_[(front_index_ + index + max_size_) % max_size_]; } |