1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-28 20:23:51 +00:00

Simplify code.

This commit is contained in:
Bartosz Taudul 2021-03-27 15:24:42 +01:00
parent 741aebaa77
commit 8ddf26fff2
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -72,15 +72,11 @@ public:
template<class Compare>
tracy_force_inline void push_back( const T& val, Compare comp )
{
if( sortedEnd != 0 || v.empty() || comp( v.back(), val ) )
{
v.push_back( val );
}
else
if( sortedEnd == 0 && !v.empty() && !comp( v.back(), val ) )
{
sortedEnd = (uint32_t)v.size();
v.push_back( val );
}
v.push_back( val );
}
tracy_force_inline void reserve( size_t cap ) { v.reserve( cap ); }