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

Some strings are always indices.

This saves 4 bytes.
This commit is contained in:
Bartosz Taudul
2017-11-14 23:37:44 +01:00
committed by Bartosz Taudul
parent 7da59a55cc
commit 7187e1e5f5
3 changed files with 21 additions and 2 deletions
+13 -1
View File
@@ -39,6 +39,18 @@ struct StringRef
uint8_t active : 1;
};
struct StringIdx
{
StringIdx() : active( 0 ) {}
StringIdx( uint32_t idx )
: idx( idx )
, active( 1 )
{}
uint32_t idx : 31;
uint32_t active : 1;
};
struct SourceLocation
{
StringRef name;
@@ -59,7 +71,7 @@ struct ZoneEvent
int8_t cpu_start;
int8_t cpu_end;
StringRef text;
StringIdx text;
Vector<ZoneEvent*> child;
};