diff --git a/source/modules/water/text/String.cpp b/source/modules/water/text/String.cpp index 7dd4cf11e..dc7cee992 100644 --- a/source/modules/water/text/String.cpp +++ b/source/modules/water/text/String.cpp @@ -241,9 +241,7 @@ void String::clear() noexcept String& String::operator= (const String& other) noexcept { - StringHolder::retain (other.text); - std::swap(text.data, const_cast(other.text).data); - StringHolder::release (other.text); + swapWith(const_cast(other)); return *this; }