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

Reduce accuracy to decrease memory load.

This commit is contained in:
Bartosz Taudul 2017-10-19 19:56:13 +02:00
parent 5278bb29e6
commit 0519df4dfc
2 changed files with 3 additions and 3 deletions

View File

@ -2501,14 +2501,14 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover )
if( m_tmpVecSize < sz ) if( m_tmpVecSize < sz )
{ {
delete[] m_tmpVec; delete[] m_tmpVec;
m_tmpVec = new double[sz]; m_tmpVec = new float[sz];
m_tmpVecSize = sz; m_tmpVecSize = sz;
} }
auto dst = m_tmpVec; auto dst = m_tmpVec;
for(;;) for(;;)
{ {
*dst++ = it->val; *dst++ = float( it->val );
if( std::distance( it, range ) > skip ) if( std::distance( it, range ) > skip )
{ {
it += skip; it += skip;

View File

@ -252,7 +252,7 @@ private:
bool m_terminate; bool m_terminate;
size_t m_tmpVecSize; size_t m_tmpVecSize;
double* m_tmpVec; float* m_tmpVec;
}; };
} }