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

Function GetOrCreateStatisticsEntry

trinity/Tr2ProfileTimer.cpp:8–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6namespace
7{
8CcpStaticStatisticsEntry* GetOrCreateStatisticsEntry( const std::string& name )
9{
10 auto& entries = CcpStatistics::GetEntryArray();
11 for( auto it = entries.begin(); it != entries.end(); ++it )
12 {
13 if( ( *it )->GetName() == name )
14 {
15 return *it;
16 }
17 }
18 return BlueStatistics::CreateDynamicEntry( name.c_str(), false, CST_TIME, "" );
19}
20}
21
22// -------------------------------------------------------------

Callers 1

EndMethod · 0.70

Calls 3

beginMethod · 0.45
endMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected