Kaydet (Commit) d785b3c4 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

bnc#590020: Sort data points stably.

std::sort is unstable sort, which is not what we want.  Use std::stable_sort
to sort data points by X values.  If we use unstable sort, it may mess up
the order of the sequence when two data points contain identical X values.

Change-Id: I6453a986185b326dc680fbcec6227ea332235b22
üst d0b94f5c
......@@ -302,7 +302,7 @@ void VDataSeries::doSortByXValues()
}
//do sort
std::sort( aTmp.begin(), aTmp.end(), lcl_LessXOfPoint() );
std::stable_sort( aTmp.begin(), aTmp.end(), lcl_LessXOfPoint() );
//fill the sorted points back to the members
m_aValues_X.Doubles.realloc( m_nPointCount );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment