Fix cppcheck issue

This commit is contained in:
badaix 2023-10-27 08:00:09 +02:00
parent 39ee4cc3a5
commit dd76dd7a2e

View file

@ -16,9 +16,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
***/ ***/
#ifndef DOUBLE_BUFFER_H #pragma once
#define DOUBLE_BUFFER_H
// standard headers
#include <algorithm> #include <algorithm>
#include <array> #include <array>
#include <deque> #include <deque>
@ -126,7 +127,7 @@ public:
inline bool empty() const inline bool empty() const
{ {
return (buffer.size() == 0); return buffer.empty();
} }
void setSize(size_t size) void setSize(size_t size)
@ -136,7 +137,7 @@ public:
const std::deque<T>& getBuffer() const const std::deque<T>& getBuffer() const
{ {
return &buffer; return buffer;
} }
private: private:
@ -144,6 +145,3 @@ private:
std::deque<T> buffer; std::deque<T> buffer;
}; };
#endif