Skip to content

Commit

Permalink
lint: use const& in push()
Browse files Browse the repository at this point in the history
Fix lint issue by using const& as the function parameter.

PR-URL: #86
Reviewed-by: Santiago Gimeno <santiago.gimeno@gmail.com>
  • Loading branch information
trevnorris committed Feb 23, 2024
1 parent e2d7087 commit 1bd9c6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nsolid/nsolid_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ class RingBuffer {
size_--;
}

void push(T& value) {
void push(const T& value) {
buffer_[tail_] = value;
tail_ = (tail_ + 1) % capacity_;

Expand Down

0 comments on commit 1bd9c6d

Please sign in to comment.