MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / CreateUnlinkedNode

Method CreateUnlinkedNode

externals/tinyxml2/tinyxml2.h:1988–1998  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1986
1987template<class NodeType, size_t PoolElementSize>
1988inline NodeType* XMLDocument::CreateUnlinkedNode( MemPoolT<PoolElementSize>& pool )
1989{
1990 TIXMLASSERT( sizeof( NodeType ) == PoolElementSize );
1991 TIXMLASSERT( sizeof( NodeType ) == pool.ItemSize() );
1992 NodeType* returnNode = new (pool.Alloc()) NodeType( this );
1993 TIXMLASSERT( returnNode );
1994 returnNode->_memPool = &pool;
1995
1996 _unlinked.Push(returnNode);
1997 return returnNode;
1998}
1999
2000/**
2001 A XMLHandle is a class that wraps a node pointer with null checks; this is

Callers

nothing calls this directly

Calls 3

ItemSizeMethod · 0.80
AllocMethod · 0.80
PushMethod · 0.80

Tested by

no test coverage detected