MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / add

Method add

tests/catch.hpp:11055–11065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11053 std::ostringstream m_referenceStream; // Used for copy state/ flags from
11054
11055 auto add() -> std::size_t {
11056 if( m_unused.empty() ) {
11057 m_streams.push_back( std::unique_ptr<std::ostringstream>( new std::ostringstream ) );
11058 return m_streams.size()-1;
11059 }
11060 else {
11061 auto index = m_unused.back();
11062 m_unused.pop_back();
11063 return index;
11064 }
11065 }
11066
11067 void release( std::size_t index ) {
11068 m_streams[index]->copyfmt( m_referenceStream ); // Restore initial flags and other state

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected