From 77e3562f2b6efcbfb38854eeee678b3f046f9564 Mon Sep 17 00:00:00 2001 From: Paul Ferrand Date: Fri, 30 Oct 2020 11:53:30 +0100 Subject: [PATCH] Mark moves noexcept and remove the assert --- src/sfizz/Voice.cpp | 6 ++---- src/sfizz/Voice.h | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/sfizz/Voice.cpp b/src/sfizz/Voice.cpp index 7f5faadc..e57dd627 100644 --- a/src/sfizz/Voice.cpp +++ b/src/sfizz/Voice.cpp @@ -266,8 +266,7 @@ Voice::~Voice() } -Voice::Voice(Voice&& other) { - ASSERT(other.impl_); +Voice::Voice(Voice&& other) noexcept { impl_ = std::move(other.impl_); if (other.nextSisterVoice_ != &other) { @@ -287,8 +286,7 @@ Voice::Voice(Voice&& other) { } } -Voice& Voice::operator=(Voice&& other) { - ASSERT(other.impl_); +Voice& Voice::operator=(Voice&& other) noexcept { impl_ = std::move(other.impl_); if (other.nextSisterVoice_ != &other) { diff --git a/src/sfizz/Voice.h b/src/sfizz/Voice.h index c5e55bcb..2e79584a 100644 --- a/src/sfizz/Voice.h +++ b/src/sfizz/Voice.h @@ -37,8 +37,8 @@ public: ~Voice(); Voice(const Voice& other) = delete; Voice& operator=(const Voice& other) = delete; - Voice(Voice&& other); - Voice& operator=(Voice&& other); + Voice(Voice&& other) noexcept; + Voice& operator=(Voice&& other) noexcept; /** * @brief Get the unique identifier of this voice in a synth