Mark moves noexcept and remove the assert

This commit is contained in:
Paul Ferrand 2020-10-30 11:53:30 +01:00
parent 3214211a06
commit 77e3562f2b
2 changed files with 4 additions and 6 deletions

View file

@ -266,8 +266,7 @@ Voice::~Voice()
} }
Voice::Voice(Voice&& other) { Voice::Voice(Voice&& other) noexcept {
ASSERT(other.impl_);
impl_ = std::move(other.impl_); impl_ = std::move(other.impl_);
if (other.nextSisterVoice_ != &other) { if (other.nextSisterVoice_ != &other) {
@ -287,8 +286,7 @@ Voice::Voice(Voice&& other) {
} }
} }
Voice& Voice::operator=(Voice&& other) { Voice& Voice::operator=(Voice&& other) noexcept {
ASSERT(other.impl_);
impl_ = std::move(other.impl_); impl_ = std::move(other.impl_);
if (other.nextSisterVoice_ != &other) { if (other.nextSisterVoice_ != &other) {

View file

@ -37,8 +37,8 @@ public:
~Voice(); ~Voice();
Voice(const Voice& other) = delete; Voice(const Voice& other) = delete;
Voice& operator=(const Voice& other) = delete; Voice& operator=(const Voice& other) = delete;
Voice(Voice&& other); Voice(Voice&& other) noexcept;
Voice& operator=(Voice&& other); Voice& operator=(Voice&& other) noexcept;
/** /**
* @brief Get the unique identifier of this voice in a synth * @brief Get the unique identifier of this voice in a synth