Skip to content

Commit

Permalink
[09_queue] const in constructor's parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam0205 committed Oct 10, 2018
1 parent 0983790 commit 1ab1e93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions c-cpp/09_queue/array_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class ArrayQueue {

public:
ArrayQueue() = delete;
ArrayQueue(size_t capacity) : capacity_(capacity) {
items_ = new T[capacity];
ArrayQueue(const size_t capacity) : capacity_(capacity) {
items_ = new T[capacity_];
}
~ArrayQueue() {
if (nullptr != items_) {
Expand Down

0 comments on commit 1ab1e93

Please sign in to comment.