Skip to content

Commit

Permalink
Simplify code.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfpld committed Mar 27, 2021
1 parent 741aeba commit 8ddf26f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions server/TracySortedVector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,11 @@ class SortedVector
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 ); }
Expand Down

0 comments on commit 8ddf26f

Please sign in to comment.