diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/svl/sharedstring.hxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/include/svl/sharedstring.hxx b/include/svl/sharedstring.hxx index 5b5c35b95a92..cef5e410e2cf 100644 --- a/include/svl/sharedstring.hxx +++ b/include/svl/sharedstring.hxx @@ -92,16 +92,8 @@ inline SharedString& SharedString::operator=(SharedString&& r) noexcept { // Having this inline helps Calc's mdds::multi_type_vector to do some operations // much faster. - if (mpData) - rtl_uString_release(mpData); - if (mpDataIgnoreCase) - rtl_uString_release(mpDataIgnoreCase); - - mpData = r.mpData; - mpDataIgnoreCase = r.mpDataIgnoreCase; - - r.mpData = nullptr; - r.mpDataIgnoreCase = nullptr; + std::swap(mpData, r.mpData); + std::swap(mpDataIgnoreCase, r.mpDataIgnoreCase); return *this; } |