Fix operator= in String class.

This commit is contained in:
castano
2008-04-29 22:32:12 +00:00
parent 8d9bf5c0b3
commit ce3a65c03e

View File

@ -212,10 +212,13 @@ namespace nv
/// Implement value semantics. /// Implement value semantics.
String & operator=( const String & str ) String & operator=( const String & str )
{
if (str.data != data)
{ {
release(); release();
data = str.data; data = str.data;
addRef(); addRef();
}
return *this; return *this;
} }