Add StringPairArray::swapWith

This commit is contained in:
Vinnie Falco committed 2013-09-07 11:53:34 -07:00
1 parent 637eafedee
commit 7a7514fa0c
2 files changed
+10

No files matched your search

@@ -44,6 +44,13 @@ StringPairArray& StringPairArray::operator= (const StringPairArray& other)
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
{
for (int i = keys.size(); --i >= 0;)
@@ -49,6 +49,9 @@ public:
/** Copies the contents of another string array into this one */
StringPairArray& operator= (const StringPairArray& other);
/** Swap the contents of this array with another. */
void swapWith (StringPairArray& other);
//==============================================================================
/** Compares two arrays.
Comparisons are case-sensitive.