mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Fix std::min type ambiguity
This commit is contained in:
@@ -210,7 +210,7 @@ RideMapWindow::showPosition(double mins)
|
||||
long secs = mins * 60;
|
||||
int idx = secs / 5;
|
||||
idx = std::max(idx, 0);
|
||||
idx = std::min(idx, positionItems.length() - 1);
|
||||
idx = std::min(idx, (int)positionItems.length() - 1);
|
||||
PositionItem positionItem = positionItems.at(idx);
|
||||
view->page()->runJavaScript(QString("setPosMarker(%1, %2);").arg(positionItem.lat).arg(positionItem.lng));
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ MeasuresCsvImport::getMeasures(MeasuresGroup *measuresGroup, QString &error, QDa
|
||||
|
||||
emit downloadStarted(100);
|
||||
|
||||
int fieldCount = std::min(measuresGroup->getFieldSymbols().count(), MAX_MEASURES);
|
||||
int fieldCount = std::min((int)measuresGroup->getFieldSymbols().count(), MAX_MEASURES);
|
||||
|
||||
// get all lines considering both LF and CR endings
|
||||
QStringList lines = QString(file.readAll()).split(QRegularExpression("[\n\r]"));
|
||||
|
||||
@@ -64,7 +64,7 @@ class VDOT : public RideMetric {
|
||||
|
||||
// search for max VDOT from 4 min to 4 hr
|
||||
vdot = 0.0;
|
||||
int iMax = std::min(rfc.meanMaxArray(RideFile::kph).size(), 14400);
|
||||
int iMax = std::min((int)rfc.meanMaxArray(RideFile::kph).size(), 14400);
|
||||
for (int i = 240; i < iMax; i++) {
|
||||
double vel = rfc.meanMaxArray(RideFile::kph)[i]*1000.0/60.0;
|
||||
vdot = std::max(vdot, VDOTCalculator::vdot(i / 60.0, vel));
|
||||
|
||||
Reference in New Issue
Block a user