From c49b02ea47d5c40bcfa392a51573ad8e0786b4bd Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Fri, 28 Aug 2015 19:34:56 +0300 Subject: [PATCH] Mark Wav move ctor/assign as noexcept --- SDL2pp/Wav.cc | 4 ++-- SDL2pp/Wav.hh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SDL2pp/Wav.cc b/SDL2pp/Wav.cc index fbbfba4..024299e 100644 --- a/SDL2pp/Wav.cc +++ b/SDL2pp/Wav.cc @@ -41,12 +41,12 @@ Wav::~Wav() { SDL_FreeWAV(audio_buffer_); } -Wav::Wav(Wav&& other) : audio_buffer_(other.audio_buffer_), audio_length_(other.audio_length_), spec_(std::move(other.spec_)) { +Wav::Wav(Wav&& other) noexcept : audio_buffer_(other.audio_buffer_), audio_length_(other.audio_length_), spec_(std::move(other.spec_)) { other.audio_buffer_ = nullptr; other.audio_length_ = 0; } -Wav& Wav::operator=(Wav&& other) { +Wav& Wav::operator=(Wav&& other) noexcept { if (&other == this) return *this; diff --git a/SDL2pp/Wav.hh b/SDL2pp/Wav.hh index 42de627..3648984 100644 --- a/SDL2pp/Wav.hh +++ b/SDL2pp/Wav.hh @@ -92,7 +92,7 @@ public: /// \param[in] other SDL2pp::Wav object to move data from /// //////////////////////////////////////////////////////////// - Wav(Wav&& other); + Wav(Wav&& other) noexcept; //////////////////////////////////////////////////////////// /// \brief Move assignment operator @@ -102,7 +102,7 @@ public: /// \returns Reference to self /// //////////////////////////////////////////////////////////// - Wav& operator=(Wav&& other); + Wav& operator=(Wav&& other) noexcept; //////////////////////////////////////////////////////////// /// \brief Deleted copy constructor