MCPcopy Create free account
hub / github.com/RenderKit/oidn / add

Method add

external/catch.hpp:13748–13758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13746 std::ostringstream m_referenceStream; // Used for copy state/ flags from
13747
13748 auto add() -> std::size_t {
13749 if( m_unused.empty() ) {
13750 m_streams.push_back( std::unique_ptr<std::ostringstream>( new std::ostringstream ) );
13751 return m_streams.size()-1;
13752 }
13753 else {
13754 auto index = m_unused.back();
13755 m_unused.pop_back();
13756 return index;
13757 }
13758 }
13759
13760 void release( std::size_t index ) {
13761 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