mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-05 11:56:00 -04:00
Mark Wav move ctor/assign as noexcept
This commit is contained in:
parent
e1c1417c50
commit
c49b02ea47
@ -41,12 +41,12 @@ Wav::~Wav() {
|
|||||||
SDL_FreeWAV(audio_buffer_);
|
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_buffer_ = nullptr;
|
||||||
other.audio_length_ = 0;
|
other.audio_length_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Wav& Wav::operator=(Wav&& other) {
|
Wav& Wav::operator=(Wav&& other) noexcept {
|
||||||
if (&other == this)
|
if (&other == this)
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ public:
|
|||||||
/// \param[in] other SDL2pp::Wav object to move data from
|
/// \param[in] other SDL2pp::Wav object to move data from
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
Wav(Wav&& other);
|
Wav(Wav&& other) noexcept;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Move assignment operator
|
/// \brief Move assignment operator
|
||||||
@ -102,7 +102,7 @@ public:
|
|||||||
/// \returns Reference to self
|
/// \returns Reference to self
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
Wav& operator=(Wav&& other);
|
Wav& operator=(Wav&& other) noexcept;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Deleted copy constructor
|
/// \brief Deleted copy constructor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user