MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / takeOwnership

Method takeOwnership

extlibs/catch/include/catch/catch.hpp:13299–13305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13297 }
13298
13299 void StringRef::takeOwnership() {
13300 if( !isOwned() ) {
13301 m_data = new char[m_size+1];
13302 memcpy( m_data, m_start, m_size );
13303 m_data[m_size] = '\0';
13304 }
13305 }
13306 auto StringRef::substr( size_type start, size_type size ) const noexcept -> StringRef {
13307 if( start < m_size )
13308 return StringRef( m_start+start, size );

Callers 1

c_strMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected