Skip to content

Commit

Permalink
Mark move operator/assignment as 'noexcept'
Browse files Browse the repository at this point in the history
  • Loading branch information
gvnnz committed Mar 30, 2024
1 parent 92a8386 commit 57d382f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/audioBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ AudioBuffer::AudioBuffer(const AudioBuffer& o)

/* -------------------------------------------------------------------------- */

AudioBuffer::AudioBuffer(AudioBuffer&& o)
AudioBuffer::AudioBuffer(AudioBuffer&& o) noexcept
{
move(std::move(o));
}
Expand All @@ -91,7 +91,7 @@ AudioBuffer& AudioBuffer::operator=(const AudioBuffer& o)

/* -------------------------------------------------------------------------- */

AudioBuffer& AudioBuffer::operator=(AudioBuffer&& o)
AudioBuffer& AudioBuffer::operator=(AudioBuffer&& o) noexcept
{
if (this == &o)
return *this;
Expand Down
4 changes: 2 additions & 2 deletions src/audioBuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class AudioBuffer
/* AudioBuffer(AudioBuffer&&)
Move constructor. */

AudioBuffer(AudioBuffer&& o);
AudioBuffer(AudioBuffer&& o) noexcept;

/* ~AudioBuffer
Destructor. */
Expand All @@ -83,7 +83,7 @@ class AudioBuffer
/* operator = (AudioBuffer&& o)
Move assignment operator. */

AudioBuffer& operator=(AudioBuffer&& o);
AudioBuffer& operator=(AudioBuffer&& o) noexcept;

/* operator []
Given a frame 'offset', returns a pointer to it. This is useful for digging
Expand Down

0 comments on commit 57d382f

Please sign in to comment.