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

Extract find zone range data to a separate struct.

This commit is contained in:
Bartosz Taudul
2020-07-28 15:12:45 +02:00
parent 7e6a41e647
commit fd5ccc16d6
2 changed files with 35 additions and 30 deletions
+11 -6
View File
@@ -56,6 +56,12 @@ class View
uint64_t count;
};
struct Range
{
int64_t min, max;
bool active = false;
};
public:
struct VisData
{
@@ -487,8 +493,7 @@ private:
int minBinVal = 1;
int64_t tmin, tmax;
bool showZoneInFrames = false;
bool limitRange = false;
int64_t rangeMin, rangeMax;
Range range;
struct
{
@@ -543,7 +548,7 @@ private:
void ShowZone( int16_t srcloc, const char* name )
{
show = true;
limitRange = false;
range.active = false;
Reset();
match.emplace_back( srcloc );
strcpy( pattern, name );
@@ -553,9 +558,9 @@ private:
{
assert( limitMin <= limitMax );
show = true;
limitRange = true;
rangeMin = limitMin;
rangeMax = limitMax;
range.active = true;
range.min = limitMin;
range.max = limitMax;
Reset();
match.emplace_back( srcloc );
strcpy( pattern, name );