Fix operator= in String class.
This commit is contained in:
parent
8d9bf5c0b3
commit
ce3a65c03e
@ -212,10 +212,13 @@ namespace nv
|
||||
|
||||
/// Implement value semantics.
|
||||
String & operator=( const String & str )
|
||||
{
|
||||
if (str.data != data)
|
||||
{
|
||||
release();
|
||||
data = str.data;
|
||||
addRef();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user