Logo Search packages:      
Sourcecode: pwlib version File versions

BOOL PString::MakeUnique (  )  [virtual, inherited]

Make this instance to be the one and only reference to the container contents. This implicitly does a clone of the contents of the container to make a unique reference. If the instance was already unique then the function does nothing.

Returns:
TRUE if the instance was already unique.

Definition at line 1640 of file contain.cxx.

References PString::SetSize().

Referenced by PString::Delete(), PString::Replace(), PString::Splice(), and PURL::UntranslateString().

{
#if PCONTAINER_USES_CRITSEC
  PEnterAndLeave m(reference->critSec);
#endif

  if (IsUnique())
    return TRUE;

  SetSize(GetSize());
  return FALSE;
}


Generated by  Doxygen 1.6.0   Back to index