MCPcopy Create free account
hub / github.com/SOUI2/soui / Empty

Method Empty

utilities/include/string/tstring.h:339–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337 return GetData()->nDataLength == 0;
338 }
339 void Empty() // free up the data
340 {
341 TStringData* pData = GetData();
342 if (pData->nDataLength == 0)
343 return;
344
345 if (pData->nRefs >= 0)
346 Release();
347 else
348 {
349 tchar sz[1] = { 0 };
350 *this = sz;
351 }
352
353 SASSERT(GetData()->nDataLength == 0);
354 SASSERT(GetData()->IsLocked() || GetData()->nAllocLength == 0);
355 }
356
357 tchar GetAt(int nIndex) const
358 {

Callers

nothing calls this directly

Calls 3

GetDataFunction · 0.85
ReleaseFunction · 0.50
IsLockedMethod · 0.45

Tested by

no test coverage detected