Don't sort zones if statistics are disabled.

This commit is contained in:
Bartosz Taudul 2018-03-20 19:12:42 +01:00
parent 4837ce31ff
commit ae55360a6d

View File

@ -208,11 +208,13 @@ Worker::Worker( FileRead& f )
m_data.threads.push_back_no_space_check( td );
}
#ifndef TRACY_NO_STATISTICS
for( auto& v : m_data.sourceLocationZones )
{
auto& zones = v.second.zones;
std::sort( zones.begin(), zones.end(), []( const auto& lhs, const auto& rhs ) { return lhs.zone->start < rhs.zone->start; } );
}
#endif
f.Read( &sz, sizeof( sz ) );
m_data.gpuData.reserve( sz );