include/fmt/core.h: detail::buffer: declare destructor as virtual, as it contains virtual methods.
This commit is contained in:
parent
f8e00a084a
commit
408f4508d3
@ -669,7 +669,7 @@ template <typename T> class buffer {
|
||||
size_(sz),
|
||||
capacity_(cap) {}
|
||||
|
||||
~buffer() = default;
|
||||
virtual ~buffer() = default;
|
||||
|
||||
/** Sets the buffer data and capacity. */
|
||||
void set(T* buf_data, size_t buf_capacity) FMT_NOEXCEPT {
|
||||
|
||||
@ -633,7 +633,7 @@ class basic_memory_buffer : public detail::buffer<T> {
|
||||
: alloc_(alloc) {
|
||||
this->set(store_, SIZE);
|
||||
}
|
||||
~basic_memory_buffer() { deallocate(); }
|
||||
~basic_memory_buffer() override { deallocate(); }
|
||||
|
||||
private:
|
||||
// Move data from other to this buffer.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user