From 0c6bb92f3f59b6b86f3b7b56224677e79b2e6900 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 16 Sep 2018 22:11:37 +0200 Subject: Lint with clang-tidy --- raul/DoubleBuffer.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'raul/DoubleBuffer.hpp') diff --git a/raul/DoubleBuffer.hpp b/raul/DoubleBuffer.hpp index 3c4d934..73b5565 100644 --- a/raul/DoubleBuffer.hpp +++ b/raul/DoubleBuffer.hpp @@ -35,7 +35,7 @@ namespace Raul { template class DoubleBuffer { public: - inline DoubleBuffer(T val) + explicit DoubleBuffer(T val) : _state(State::READ_WRITE) { _vals[0] = std::move(val); @@ -49,9 +49,11 @@ public: case State::READ_WRITE: case State::READ_LOCK: return _vals[0]; - default: - return _vals[1]; + case State::WRITE_READ: + case State::LOCK_READ: + break; } + return _vals[1]; } inline bool set(T new_val) { -- cgit v1.2.1