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:
@@ -241,7 +241,7 @@ ValueInternalMap::~ValueInternalMap ()
|
||||
|
||||
|
||||
void
|
||||
ValueInternalMap::swap ( ValueInternalMap& other )
|
||||
ValueInternalMap::swap ( ValueInternalMap& other ) noexcept
|
||||
{
|
||||
ValueInternalLink* tempBuckets = buckets_;
|
||||
buckets_ = other.buckets_;
|
||||
|
||||
@@ -208,7 +208,7 @@ Value::CZString::~CZString ()
|
||||
}
|
||||
|
||||
void
|
||||
Value::CZString::swap ( CZString& other )
|
||||
Value::CZString::swap ( CZString& other ) noexcept
|
||||
{
|
||||
std::swap ( cstr_, other.cstr_ );
|
||||
std::swap ( index_, other.index_ );
|
||||
@@ -558,7 +558,7 @@ Value::operator= ( const Value& other )
|
||||
return *this;
|
||||
}
|
||||
|
||||
Value::Value ( Value&& other )
|
||||
Value::Value ( Value&& other ) noexcept
|
||||
: value_ ( other.value_ )
|
||||
, type_ ( other.type_ )
|
||||
, allocated_ ( other.allocated_ )
|
||||
@@ -572,14 +572,14 @@ Value::Value ( Value&& other )
|
||||
}
|
||||
|
||||
Value&
|
||||
Value::operator= ( Value&& other )
|
||||
Value::operator= ( Value&& other ) noexcept
|
||||
{
|
||||
swap ( other );
|
||||
return *this;
|
||||
}
|
||||
|
||||
void
|
||||
Value::swap ( Value& other )
|
||||
Value::swap ( Value& other ) noexcept
|
||||
{
|
||||
std::swap ( value_, other.value_ );
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ private:
|
||||
const char* c_str () const;
|
||||
bool isStaticString () const;
|
||||
private:
|
||||
void swap ( CZString& other );
|
||||
void swap ( CZString& other ) noexcept;
|
||||
const char* cstr_;
|
||||
int index_;
|
||||
};
|
||||
@@ -224,13 +224,13 @@ public:
|
||||
|
||||
Value& operator= ( const Value& other );
|
||||
|
||||
Value ( Value&& other );
|
||||
Value& operator= ( Value&& other );
|
||||
Value ( Value&& other ) noexcept;
|
||||
Value& operator= ( Value&& other ) noexcept;
|
||||
|
||||
/// Swap values.
|
||||
/// \note Currently, comments are intentionally not swapped, for
|
||||
/// both logic and efficiency.
|
||||
void swap ( Value& other );
|
||||
void swap ( Value& other ) noexcept;
|
||||
|
||||
ValueType type () const;
|
||||
|
||||
@@ -678,7 +678,7 @@ public:
|
||||
ValueInternalMap& operator = ( const ValueInternalMap& other );
|
||||
~ValueInternalMap ();
|
||||
|
||||
void swap ( ValueInternalMap& other );
|
||||
void swap ( ValueInternalMap& other ) noexcept;
|
||||
|
||||
BucketIndex size () const;
|
||||
|
||||
@@ -774,7 +774,7 @@ public:
|
||||
ValueInternalArray ( const ValueInternalArray& other );
|
||||
ValueInternalArray& operator = ( const ValueInternalArray& other );
|
||||
~ValueInternalArray ();
|
||||
void swap ( ValueInternalArray& other );
|
||||
void swap ( ValueInternalArray& other ) noexcept;
|
||||
|
||||
void clear ();
|
||||
void resize ( ArrayIndex newSize );
|
||||
|
||||
Reference in New Issue
Block a user