util/ReusableArray: use C++11 initializers
This commit is contained in:
parent
f32315d699
commit
6778ff27ea
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user