1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Use pdqsort.

This commit is contained in:
Bartosz Taudul
2017-12-08 23:11:08 +01:00
parent 2c4eaf162d
commit 0da09bc62b
3 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -18,6 +18,7 @@
#include "../common/TracyProtocol.hpp"
#include "../common/TracySystem.hpp"
#include "../common/TracyQueue.hpp"
#include "tracy_pdqsort.h"
#include "TracyFileRead.hpp"
#include "TracyFileWrite.hpp"
#include "TracyImGui.hpp"
@@ -3294,7 +3295,7 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover )
break;
}
}
std::sort( tmpvec, dst );
pdqsort_branchless( tmpvec, dst );
draw->AddLine( wpos + ImVec2( x1, offset + PlotHeight - ( tmpvec[0] - min ) * revrange * PlotHeight ), wpos + ImVec2( x1, offset + PlotHeight - ( dst[-1] - min ) * revrange * PlotHeight ), 0xFF44DDDD );