Merge fixes from trunk.

2.0
castano 16 years ago
parent ad43f6e5f2
commit 3f13eb89f1

@ -14,7 +14,7 @@ namespace nv
uint strHash(const char * str, uint h) NV_PURE; uint strHash(const char * str, uint h) NV_PURE;
/// String hash vased on Bernstein's hash. /// String hash based on Bernstein's hash.
inline uint strHash(const char * data, uint h = 5381) inline uint strHash(const char * data, uint h = 5381)
{ {
uint i; uint i;
@ -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;
} }

Loading…
Cancel
Save