MCPcopy Create free account
hub / github.com/Profactor/cv-plot / add

Method add

CvPlot/ext/catch2/inc/catch.hpp:13522–13532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13520 std::ostringstream m_referenceStream; // Used for copy state/ flags from
13521
13522 auto add() -> std::size_t {
13523 if( m_unused.empty() ) {
13524 m_streams.push_back( std::unique_ptr<std::ostringstream>( new std::ostringstream ) );
13525 return m_streams.size()-1;
13526 }
13527 else {
13528 auto index = m_unused.back();
13529 m_unused.pop_back();
13530 return index;
13531 }
13532 }
13533
13534 void release( std::size_t index ) {
13535 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