Skip to content
Browse files

CSV : Convert total weight to metric (if needed)

  • Loading branch information...
grauser committed May 13, 2019
1 parent 20d6d80 commit c45bd52edd52c04256cf507925821ab7a902ba3a
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/FileIO/CsvRideFile.cpp
@@ -583,7 +583,8 @@ RideFile *CsvFileReader::openRideFile(QFile &file, QStringList &errors, QList<Ri

// Convert Total Weight
double weight = rideFile->getTag("Total Weight", "0").toDouble();
if (weight>0) {
if (!metric & weight>0) {

This comment has been minimized.

Copy link

amtriathlon May 14, 2019


This line triggers a compile warning about parenthesis, but likely && is the intended operator

// keep weight in metric
weight = weight / LB_PER_KG;
rideFile->setTag("Total Weight", QString("%1").arg(weight));

1 comment on commit c45bd52


This comment has been minimized.

Copy link
Member Author

commented on c45bd52 May 14, 2019

Thank you Ale, I changed the metric determination to avoid conversion after setting the tag in commit 09acc47

Please sign in to comment.
You can’t perform that action at this time.