summaryrefslogtreecommitdiffstats
path: root/source/core/slang-string-slice-pool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/slang-string-slice-pool.cpp')
-rw-r--r--source/core/slang-string-slice-pool.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/core/slang-string-slice-pool.cpp b/source/core/slang-string-slice-pool.cpp
index a0af3ba68..45cc811a3 100644
--- a/source/core/slang-string-slice-pool.cpp
+++ b/source/core/slang-string-slice-pool.cpp
@@ -41,6 +41,14 @@ void StringSlicePool::clear()
}
}
+void StringSlicePool::swapWith(ThisType& rhs)
+{
+ Swap(m_style, rhs.m_style);
+ m_slices.swapWith(rhs.m_slices);
+ m_map.swapWith(rhs.m_map);
+ m_arena.swapWith(rhs.m_arena);
+}
+
StringSlicePool::Handle StringSlicePool::add(const Slice& slice)
{
const Handle* handlePtr = m_map.TryGetValue(slice);