[09_queue] const in constructor's parameter.
This commit is contained in:
parent
0983790871
commit
1ab1e93edc
@ -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_) {
|
||||
|
Loading…
Reference in New Issue
Block a user