util/PeakBuffer: add noexcept

This commit is contained in:
Max Kellermann 2021-01-21 16:41:57 +01:00
parent 6b555b7017
commit fa82f558be
2 changed files with 4 additions and 4 deletions

View File

@ -25,7 +25,7 @@
#include <string.h> #include <string.h>
PeakBuffer::~PeakBuffer() PeakBuffer::~PeakBuffer() noexcept
{ {
delete normal_buffer; delete normal_buffer;
delete peak_buffer; delete peak_buffer;

View File

@ -39,11 +39,11 @@ class PeakBuffer {
DynamicFifoBuffer<uint8_t> *normal_buffer, *peak_buffer; DynamicFifoBuffer<uint8_t> *normal_buffer, *peak_buffer;
public: public:
PeakBuffer(std::size_t _normal_size, std::size_t _peak_size) PeakBuffer(std::size_t _normal_size, std::size_t _peak_size) noexcept
:normal_size(_normal_size), peak_size(_peak_size), :normal_size(_normal_size), peak_size(_peak_size),
normal_buffer(nullptr), peak_buffer(nullptr) {} normal_buffer(nullptr), peak_buffer(nullptr) {}
PeakBuffer(PeakBuffer &&other) PeakBuffer(PeakBuffer &&other) noexcept
:normal_size(other.normal_size), peak_size(other.peak_size), :normal_size(other.normal_size), peak_size(other.peak_size),
normal_buffer(other.normal_buffer), normal_buffer(other.normal_buffer),
peak_buffer(other.peak_buffer) { peak_buffer(other.peak_buffer) {
@ -51,7 +51,7 @@ public:
other.peak_buffer = nullptr; other.peak_buffer = nullptr;
} }
~PeakBuffer(); ~PeakBuffer() noexcept;
PeakBuffer(const PeakBuffer &) = delete; PeakBuffer(const PeakBuffer &) = delete;
PeakBuffer &operator=(const PeakBuffer &) = delete; PeakBuffer &operator=(const PeakBuffer &) = delete;