MCPcopy Create free account
hub / github.com/bblanchon/ArduinoJson / add

Method add

extras/tests/catch/catch.hpp:13761–13771  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13759 std::ostringstream m_referenceStream; // Used for copy state/ flags from
13760
13761 auto add() -> std::size_t {
13762 if( m_unused.empty() ) {
13763 m_streams.push_back( std::unique_ptr<std::ostringstream>( new std::ostringstream ) );
13764 return m_streams.size()-1;
13765 }
13766 else {
13767 auto index = m_unused.back();
13768 m_unused.pop_back();
13769 return index;
13770 }
13771 }
13772
13773 void release( std::size_t index ) {
13774 m_streams[index]->copyfmt( m_referenceStream ); // Restore initial flags and other state

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected