[09_queue] const in constructor's parameter.

This commit is contained in:
Liam Huang 2018-10-10 22:16:57 +08:00
parent 0983790871
commit 1ab1e93edc

View File

@ -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_) {