1
0
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:
Bartosz Taudul
2018-03-15 22:54:10 +01:00
parent 9dfa9c95cb
commit 81ff554c7d
3 changed files with 35 additions and 10 deletions
+5
View File
@@ -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;