diff options
author | David Robillard <d@drobilla.net> | 2020-12-19 11:58:34 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-19 12:02:24 +0100 |
commit | 2a09c19703b242aaf693e5b52a70c1ad65332119 (patch) | |
tree | fcaf9fdffa4dcb80a74fc4e1b2c90e81e7e20fb6 /include/raul/DoubleBuffer.hpp | |
parent | 5680e5900f6fb89ec66af6480a7d125fc8960552 (diff) | |
download | raul-2a09c19703b242aaf693e5b52a70c1ad65332119.tar.gz raul-2a09c19703b242aaf693e5b52a70c1ad65332119.tar.bz2 raul-2a09c19703b242aaf693e5b52a70c1ad65332119.zip |
Avoid "else" after "return"
Diffstat (limited to 'include/raul/DoubleBuffer.hpp')
-rw-r--r-- | include/raul/DoubleBuffer.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/raul/DoubleBuffer.hpp b/include/raul/DoubleBuffer.hpp index 73b5565..f6ab826 100644 --- a/include/raul/DoubleBuffer.hpp +++ b/include/raul/DoubleBuffer.hpp @@ -62,7 +62,9 @@ public: _vals[1] = std::move(new_val); _state.store(State::WRITE_READ, std::memory_order_release); return true; - } else if (transition(State::WRITE_READ, State::LOCK_READ)) { + } + + if (transition(State::WRITE_READ, State::LOCK_READ)) { // Locked _vals[0] for writing _vals[0] = std::move(new_val); _state.store(State::READ_WRITE, std::memory_order_release); |