MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / isExtended

Method isExtended

src/fco/fcopropvector.cpp:360–376  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////// isExtended -- Returns true if Vector is USING mpBuf beyond [0]. It is assumed that {mpBuf [i] |i>0} is being used if i has non-zero value. //////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

358// is assumed that {mpBuf [i] |i>0} is being used if i has non-zero value.
359///////////////////////////////////////////////////////////////////////////////
360bool cFCOPropVector::isExtended(void) const
361{
362 if (mpBuf == NULL)
363 return false;
364 else
365 {
366 if ((*mpBuf).size() <= 1)
367 return false;
368 else
369 {
370 uint32 sum = 0;
371 for (uint32 i = (*mpBuf).size() - 1; i >= 2; i--)
372 sum += ((*mpBuf)[i]);
373 return (sum != 0);
374 }
375 }
376}
377
378
379// TO DO: temp function, will delete after testing... DA

Callers 1

operator==Method · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected