Better commit, mark noexcept

This commit is contained in:
avogar 2023-01-13 16:33:11 +00:00
parent 76c89c6d20
commit 6cb7c4d175

View File

@ -179,14 +179,14 @@ private:
ReaderHolder(const ReaderHolder & other) = delete; ReaderHolder(const ReaderHolder & other) = delete;
ReaderHolder & operator=(const ReaderHolder & other) = delete; ReaderHolder & operator=(const ReaderHolder & other) = delete;
ReaderHolder(ReaderHolder && other) ReaderHolder(ReaderHolder && other) noexcept
{ {
*this = std::move(other); *this = std::move(other);
} }
ReaderHolder & operator=(ReaderHolder && other) ReaderHolder & operator=(ReaderHolder && other) noexcept
{ {
/// The order is important. /// The order of destruction is important.
/// reader uses pipeline, pipeline uses read_buf. /// reader uses pipeline, pipeline uses read_buf.
reader = std::move(other.reader); reader = std::move(other.reader);
pipeline = std::move(other.pipeline); pipeline = std::move(other.pipeline);