Commit 6778ff27 authored by Max Kellermann's avatar Max Kellermann

util/ReusableArray: use C++11 initializers

parent f32315d6
/* /*
* 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 @@ ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment