Simplify loop.

This commit is contained in:
Bartosz Taudul 2019-07-31 18:53:51 +02:00
parent f41834370c
commit 344d36086f

View File

@ -3806,18 +3806,13 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl
assert( sz <= MaxPoints*2 );
auto dst = tmpvec;
for(;;)
const auto rsz = std::distance( it, range );
const auto ssz = rsz / skip1;
for( int64_t i=0; i<ssz; i++ )
{
*dst++ = float( it->val );
if( std::distance( it, range ) > skip1 )
{
it += skip1;
}
else
{
break;
}
}
pdqsort_branchless( tmpvec, dst );
if( rsz > MaxPoints )