mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
Add StringPairArray::swapWith
This commit is contained in:
@@ -44,6 +44,13 @@ StringPairArray& StringPairArray::operator= (const StringPairArray& other)
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StringPairArray::swapWith (StringPairArray& other)
|
||||||
|
{
|
||||||
|
std::swap (ignoreCase, other.ignoreCase);
|
||||||
|
keys.swapWith (other.keys);
|
||||||
|
values.swapWith (other.values);
|
||||||
|
}
|
||||||
|
|
||||||
bool StringPairArray::operator== (const StringPairArray& other) const
|
bool StringPairArray::operator== (const StringPairArray& other) const
|
||||||
{
|
{
|
||||||
for (int i = keys.size(); --i >= 0;)
|
for (int i = keys.size(); --i >= 0;)
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ public:
|
|||||||
/** Copies the contents of another string array into this one */
|
/** Copies the contents of another string array into this one */
|
||||||
StringPairArray& operator= (const StringPairArray& other);
|
StringPairArray& operator= (const StringPairArray& other);
|
||||||
|
|
||||||
|
/** Swap the contents of this array with another. */
|
||||||
|
void swapWith (StringPairArray& other);
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
/** Compares two arrays.
|
/** Compares two arrays.
|
||||||
Comparisons are case-sensitive.
|
Comparisons are case-sensitive.
|
||||||
|
|||||||
Reference in New Issue
Block a user