MCPcopy Create free account
hub / github.com/carbonengine/trinity / Save

Method Save

shadercompiler/EffectData.h:602–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600{
601 template <typename T>
602 void Save( T& stream )
603 {
604 stream.Save( uint8_t( annotations.size() ) );
605
606 std::vector<StringReference> keys;
607 keys.reserve( annotations.size() );
608 for( auto& k : annotations )
609 {
610 keys.push_back( k.first );
611 }
612
613 std::sort( begin( keys ), end( keys ), []( StringReference a, StringReference b ) {
614 extern StringTable g_stringTable;
615 return strcmp( g_stringTable.GetString( a ), g_stringTable.GetString( b ) ) < 0;
616 } );
617
618 for( auto key : keys )
619 {
620 stream.Save( key );
621 annotations[key].Save( stream );
622 }
623 }
624
625 std::map<StringReference, Annotation> annotations;
626};

Callers

nothing calls this directly

Calls 5

sizeMethod · 0.80
beginFunction · 0.50
endFunction · 0.50
SaveMethod · 0.45
GetStringMethod · 0.45

Tested by

no test coverage detected