mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add noexcept qualifier to swaps and moves.
This commit is contained in:
@@ -42,7 +42,7 @@ Collection::~Collection ()
|
||||
parent_->enabled_ = true;
|
||||
}
|
||||
|
||||
Collection& Collection::operator= (Collection&& that)
|
||||
Collection& Collection::operator= (Collection&& that) noexcept
|
||||
{
|
||||
parent_ = that.parent_;
|
||||
writer_ = that.writer_;
|
||||
@@ -55,7 +55,7 @@ Collection& Collection::operator= (Collection&& that)
|
||||
return *this;
|
||||
}
|
||||
|
||||
Collection::Collection (Collection&& that)
|
||||
Collection::Collection (Collection&& that) noexcept
|
||||
{
|
||||
*this = std::move (that);
|
||||
}
|
||||
|
||||
@@ -151,8 +151,8 @@ namespace RPC {
|
||||
class Collection
|
||||
{
|
||||
public:
|
||||
Collection (Collection&& c);
|
||||
Collection& operator= (Collection&& c);
|
||||
Collection (Collection&& c) noexcept;
|
||||
Collection& operator= (Collection&& c) noexcept;
|
||||
Collection() = delete;
|
||||
|
||||
~Collection();
|
||||
@@ -294,7 +294,7 @@ public:
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
WriterObject (WriterObject&& other)
|
||||
WriterObject (WriterObject&& other) noexcept
|
||||
: writer_ (std::move (other.writer_)),
|
||||
object_ (std::move (other.object_))
|
||||
{
|
||||
|
||||
@@ -220,12 +220,12 @@ Writer::~Writer()
|
||||
impl_->finishAll ();
|
||||
}
|
||||
|
||||
Writer::Writer(Writer&& w)
|
||||
Writer::Writer(Writer&& w) noexcept
|
||||
{
|
||||
impl_ = std::move (w.impl_);
|
||||
}
|
||||
|
||||
Writer& Writer::operator=(Writer&& w)
|
||||
Writer& Writer::operator=(Writer&& w) noexcept
|
||||
{
|
||||
impl_ = std::move (w.impl_);
|
||||
return *this;
|
||||
|
||||
@@ -129,8 +129,8 @@ public:
|
||||
enum CollectionType {array, object};
|
||||
|
||||
explicit Writer (Output const& output);
|
||||
Writer(Writer&&);
|
||||
Writer& operator=(Writer&&);
|
||||
Writer(Writer&&) noexcept;
|
||||
Writer& operator=(Writer&&) noexcept;
|
||||
|
||||
~Writer();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user