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

Use Range for annotation extent.

This commit is contained in:
Bartosz Taudul
2020-08-04 17:14:58 +02:00
parent 2acc1d9670
commit f589fba274
3 changed files with 30 additions and 31 deletions
+4 -4
View File
@@ -184,8 +184,8 @@ void UserData::LoadAnnotations( std::vector<std::unique_ptr<Annotation>>& data )
fread( buf, 1, tsz, f );
ann->text.assign( buf, tsz );
}
fread( &ann->start, 1, sizeof( ann->start ), f );
fread( &ann->end, 1, sizeof( ann->end ), f );
fread( &ann->range.min, 1, sizeof( ann->range.min ), f );
fread( &ann->range.max, 1, sizeof( ann->range.max ), f );
fread( &ann->color, 1, sizeof( ann->color ), f );
data.emplace_back( std::move( ann ) );
@@ -219,8 +219,8 @@ void UserData::SaveAnnotations( const std::vector<std::unique_ptr<Annotation>>&
{
fwrite( ann->text.c_str(), 1, sz, f );
}
fwrite( &ann->start, 1, sizeof( ann->start ), f );
fwrite( &ann->end, 1, sizeof( ann->end ), f );
fwrite( &ann->range.min, 1, sizeof( ann->range.min ), f );
fwrite( &ann->range.max, 1, sizeof( ann->range.max ), f );
fwrite( &ann->color, 1, sizeof( ann->color ), f );
}
fclose( f );