From c34c534d2cca50844b184b236517208e0fbe396c Mon Sep 17 00:00:00 2001 From: Lionel AINS Date: Thu, 23 Apr 2020 11:47:17 +0200 Subject: [PATCH] Removing SonarCloud warning on destructor (minor) --- include/spi/ByteBuffer.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/spi/ByteBuffer.h b/include/spi/ByteBuffer.h index 23fb2eeb..6aff6b0b 100644 --- a/include/spi/ByteBuffer.h +++ b/include/spi/ByteBuffer.h @@ -28,7 +28,13 @@ class LIBEXPORT ByteBuffer : public std::vector { public: ByteBuffer() : _Base() { } ByteBuffer(const ByteBuffer& other) : _Base(other) { } //NOSONAR - ~ByteBuffer() = default; /* This is to please SonarCloud because std::vector class's destructor is not virtual anyway */ + /** + * @brief Destructor + * + * @warning This destructor definition is here to please SonarCloud because std::vector class's destructor is not virtual anyway + */ + ~ByteBuffer() = default; + #if __cplusplus >= 201103L ByteBuffer(ByteBuffer&& other) noexcept : _Base(std::move(other)) { } ByteBuffer(std::vector&& other) noexcept : _Base(std::move(other)) { } @@ -61,6 +67,7 @@ class LIBEXPORT ByteBuffer : public std::vector { this->push_back(*it); } } + ByteBuffer& operator=(const ByteBuffer& other) { return static_cast(_Base::operator=(static_cast<_Base>(other))); }