mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-11-15 10:05:47 +08:00
fixed some compiler warnings (qSort is deprecated ... using std::sort instead)
This commit is contained in:
parent
61d3108fb8
commit
d494407e76
@ -54,7 +54,7 @@ int main(int argc, char* argv[])
|
||||
hi.second=hi.second/static_cast<double>(NDATA);
|
||||
}
|
||||
// sort random data in order to calculate the statistical properties:
|
||||
qSort(RANDVAL);
|
||||
std::sort(RANDVAL.begin(), RANDVAL.end());
|
||||
const double rndMean=sum/static_cast<double>(NDATA);
|
||||
const double rndMin=RANDVAL.first();
|
||||
const double rndMax=RANDVAL.last();
|
||||
|
@ -2495,22 +2495,22 @@ bool JKQTPBuildColorPaletteLUTLinSegLessThan(const JKQTPColorPaletteSingleColorL
|
||||
}
|
||||
|
||||
JKQTPImageTools::LUTType JKQTPBuildColorPaletteLUTLinInterpolate(QList<QPair<double, QRgb> > items, int lut_size) {
|
||||
qSort(items.begin(), items.end(), JKQTPBuildColorPaletteLUTLessThan);
|
||||
std::sort(items.begin(), items.end(), JKQTPBuildColorPaletteLUTLessThan);
|
||||
return JKQTPBuildColorPaletteLUTLinInterpolateSorted(items, lut_size);
|
||||
}
|
||||
|
||||
|
||||
|
||||
JKQTPImageTools::LUTType JKQTPBuildColorPaletteLUT(QList<QPair<double, QRgb> > items, int lut_size) {
|
||||
qSort(items.begin(), items.end(), JKQTPBuildColorPaletteLUTLessThan);
|
||||
std::sort(items.begin(), items.end(), JKQTPBuildColorPaletteLUTLessThan);
|
||||
return JKQTPBuildColorPaletteLUTSorted(items, lut_size);
|
||||
}
|
||||
|
||||
JKQTPImageTools::LUTType JKQTPBuildColorPaletteLUTLinSegments( QList<JKQTPColorPaletteSingleColorLinSegment> itemsR, QList<JKQTPColorPaletteSingleColorLinSegment> itemsG, QList<JKQTPColorPaletteSingleColorLinSegment> itemsB, int lut_size)
|
||||
{
|
||||
qSort(itemsR.begin(), itemsR.end(), JKQTPBuildColorPaletteLUTLinSegLessThan);
|
||||
qSort(itemsG.begin(), itemsG.end(), JKQTPBuildColorPaletteLUTLinSegLessThan);
|
||||
qSort(itemsB.begin(), itemsB.end(), JKQTPBuildColorPaletteLUTLinSegLessThan);
|
||||
std::sort(itemsR.begin(), itemsR.end(), JKQTPBuildColorPaletteLUTLinSegLessThan);
|
||||
std::sort(itemsG.begin(), itemsG.end(), JKQTPBuildColorPaletteLUTLinSegLessThan);
|
||||
std::sort(itemsB.begin(), itemsB.end(), JKQTPBuildColorPaletteLUTLinSegLessThan);
|
||||
return JKQTPBuildColorPaletteLUTLinSegmentsSorted(itemsR, itemsG, itemsB, lut_size);
|
||||
}
|
||||
|
||||
|
@ -231,7 +231,7 @@ bool JKQTPContourPlot::getRelativeLevels() const
|
||||
void JKQTPContourPlot::addContourLevel(double level)
|
||||
{
|
||||
contourLevels.append(level);
|
||||
qSort(contourLevels);
|
||||
std::sort(contourLevels.begin(), contourLevels.end());
|
||||
clearCachedContours();
|
||||
}
|
||||
|
||||
|
@ -304,7 +304,7 @@ void JKQTPContourPlot::setContourLevels(const TContainer &levels, const TColorCo
|
||||
contourOverrideColor[v]=*itc;
|
||||
++itc;
|
||||
}
|
||||
qSort(contourLevels);
|
||||
std::sort(contourLevels.begin(), contourLevels.end());
|
||||
clearCachedContours();
|
||||
|
||||
}
|
||||
@ -318,7 +318,7 @@ void JKQTPContourPlot::setContourLevels(const TContainer &levels)
|
||||
for (auto it=levels.begin(); it!=levels.end(); ++it) {
|
||||
contourLevels<<jkqtp_todouble(*it);
|
||||
}
|
||||
qSort(contourLevels);
|
||||
std::sort(contourLevels.begin(), contourLevels.end());
|
||||
clearCachedContours();
|
||||
|
||||
}
|
||||
|
@ -166,9 +166,9 @@ void JKQTPEnhancedTableView::copySelectionToExcel(int copyrole, bool storeHead)
|
||||
}
|
||||
}
|
||||
QList<int> rowlist=QList<int>::fromSet(rows);
|
||||
qSort(rowlist.begin(), rowlist.end());
|
||||
std::sort(rowlist.begin(), rowlist.end());
|
||||
QList<int> collist=QList<int>::fromSet(cols);
|
||||
qSort(collist.begin(), collist.end());
|
||||
std::sort(collist.begin(), collist.end());
|
||||
int rowcnt=rowlist.size();
|
||||
int colcnt=collist.size();
|
||||
QList<QStringList> data;
|
||||
@ -285,9 +285,9 @@ void JKQTPEnhancedTableView::copySelectionToCSV(int copyrole, bool storeHead, co
|
||||
}
|
||||
}
|
||||
QList<int> rowlist=QList<int>::fromSet(rows);
|
||||
qSort(rowlist.begin(), rowlist.end());
|
||||
std::sort(rowlist.begin(), rowlist.end());
|
||||
QList<int> collist=QList<int>::fromSet(cols);
|
||||
qSort(collist.begin(), collist.end());
|
||||
std::sort(collist.begin(), collist.end());
|
||||
int rowcnt=rowlist.size();
|
||||
int colcnt=collist.size();
|
||||
QList<QStringList> data;
|
||||
|
Loading…
Reference in New Issue
Block a user