1
0
mirror of https://github.com/wolfpld/tracy synced 2025-05-01 21:23:52 +00:00

Overflow checks are not needed.

This commit is contained in:
Bartosz Taudul 2018-04-29 02:47:25 +02:00
parent b06f445de9
commit 723f98d24b

View File

@ -580,7 +580,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
if( aptr->timeAlloc < fptr->first ) if( aptr->timeAlloc < fptr->first )
{ {
time = aptr->timeAlloc; time = aptr->timeAlloc;
usage += aptr->size; usage += int64_t( aptr->size );
aptr++; aptr++;
} }
else else
@ -599,7 +599,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
{ {
assert( aptr->timeFree < 0 ); assert( aptr->timeFree < 0 );
int64_t time = aptr->timeAlloc; int64_t time = aptr->timeAlloc;
usage += aptr->size; usage += int64_t( aptr->size );
assert( min <= usage ); assert( min <= usage );
if( max < usage ) max = usage; if( max < usage ) max = usage;
ptr->time = time; ptr->time = time;