mirror of
https://github.com/mcneel/opennurbs.git
synced 2026-03-17 06:46:01 +08:00
Sync changes from upstream repository
Co-authored-by: croudyj <croudyj@gmail.com> Co-authored-by: Dale Fugier <dale@mcneel.com> Co-authored-by: Dan Rigdon-Bel <dan@mcneel.com> Co-authored-by: kike-garbo <kike@mcneel.com> Co-authored-by: piac <giulio@mcneel.com> Co-authored-by: Pierre Cuvilliers <pierre@mcneel.com>
This commit is contained in:
@@ -796,11 +796,22 @@ void ON_String::Append( const unsigned char* s , int count )
|
||||
AppendToArray(count,s);
|
||||
}
|
||||
|
||||
|
||||
const ON_String& ON_String::operator+=(const ON_String& s)
|
||||
{
|
||||
AppendToArray(s);
|
||||
return *this;
|
||||
// 28th July 2022 John Croudy, https://mcneel.myjetbrains.com/youtrack/issue/RH-69587
|
||||
// When the strings are the same object AppendToArray() doesn't work properly. The safest
|
||||
// thing to do is copy the incoming string so they are not the same object anymore.
|
||||
if (this == &s)
|
||||
{
|
||||
ON_String copy = s;
|
||||
AppendToArray(copy);
|
||||
}
|
||||
else
|
||||
{
|
||||
AppendToArray(s);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
const ON_String& ON_String::operator+=( char s )
|
||||
|
||||
Reference in New Issue
Block a user