util/ReusableArray: use C++11 initializers

This commit is contained in:
Max Kellermann 2017-01-11 20:33:01 +01:00
parent f32315d699
commit 6778ff27ea

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2013 Max Kellermann <max@duempel.org> * Copyright (C) 2013-2017 Max Kellermann <max@duempel.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
@ -44,11 +44,11 @@
*/ */
template<typename T, size_t M=1> template<typename T, size_t M=1>
class ReusableArray { class ReusableArray {
T *buffer; T *buffer = nullptr;
size_t capacity; size_t capacity = 0;
public: public:
ReusableArray():buffer(nullptr), capacity(0) {} ReusableArray() = default;
ReusableArray(const ReusableArray &other) = delete; ReusableArray(const ReusableArray &other) = delete;
ReusableArray &operator=(const ReusableArray &other) = delete; ReusableArray &operator=(const ReusableArray &other) = delete;