SmallString: Improve self-assignment behaviour

This commit is contained in:
chaoticgd authored and Ty committed 2026-03-16 09:41:38 -04:00
1 parent 6aed46c603
commit d049c395fc
3 files changed
+15 -1

No files matched your search

+2 -1
View File
@@ -392,7 +392,8 @@ void SmallStringBase::vsprintf(const char* format, va_list ap)
void SmallStringBase::assign(const SmallStringBase& copy)
{
assign(copy.c_str(), copy.length());
if (this != &copy)
assign(copy.c_str(), copy.length());
}
void SmallStringBase::assign(const char* str)