Mark Wav move ctor/assign as noexcept

This commit is contained in:
Dmitry Marakasov 2015-08-28 19:34:56 +03:00
parent e1c1417c50
commit c49b02ea47
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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