mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Don't call ReadTimeline() when there's nothing to read.
This commit is contained in:
@@ -170,6 +170,11 @@ public:
|
||||
void reserve( size_t cap )
|
||||
{
|
||||
if( cap == 0 || cap <= Capacity() ) return;
|
||||
reserve_non_zero( cap );
|
||||
}
|
||||
|
||||
void reserve_non_zero( size_t cap )
|
||||
{
|
||||
cap--;
|
||||
cap |= cap >> 1;
|
||||
cap |= cap >> 2;
|
||||
|
||||
Reference in New Issue
Block a user