1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Add strings to map directly in StringDiscovery.

This commit is contained in:
Bartosz Taudul
2018-08-04 17:10:45 +02:00
parent 2f01014a95
commit 0b4c2724ce
2 changed files with 5 additions and 10 deletions
+1 -5
View File
@@ -1613,16 +1613,12 @@ void Worker::InsertPlot( PlotData* plot, int64_t time, double val )
void Worker::HandlePlotName( uint64_t name, char* str, size_t sz )
{
const auto sl = StoreString( str, sz );
bool addString = m_data.plots.StringDiscovered( name, sl, [this] ( PlotData* dst, PlotData* src ) {
m_data.plots.StringDiscovered( name, sl, m_data.strings, [this] ( PlotData* dst, PlotData* src ) {
for( auto& v : src->data )
{
InsertPlot( dst, v.time, v.val );
}
} );
if( addString )
{
m_data.strings.emplace( name, sl.ptr );
}
}
void Worker::HandlePostponedPlots()