From 0d92ef28355898c81bdcc0187736580e4f094b91 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 3 Sep 2022 13:54:52 +0200 Subject: [PATCH] cleanup: remove unused variable A QVariant was initialized but never used. While doing so, remove construct/assign pairs of a number of QStrings. Directly construct the QStrings with the desired values. Signed-off-by: Berthold Stoeger --- core/divelogexportlogic.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/core/divelogexportlogic.cpp b/core/divelogexportlogic.cpp index 7e7e0675ad..c487a34468 100644 --- a/core/divelogexportlogic.cpp +++ b/core/divelogexportlogic.cpp @@ -35,13 +35,11 @@ static void exportHTMLsettings(const QString &filename, struct htmlExportSetting } else if (prefs.unit_system == IMPERIAL) { out << "\"unit_system\":\"Imperial\""; } else { - QVariant v; - QString length, pressure, volume, temperature, weight; - length = prefs.units.length == units::METERS ? "METER" : "FEET"; - pressure = prefs.units.pressure == units::BAR ? "BAR" : "PSI"; - volume = prefs.units.volume == units::LITER ? "LITER" : "CUFT"; - temperature = prefs.units.temperature == units::CELSIUS ? "CELSIUS" : "FAHRENHEIT"; - weight = prefs.units.weight == units::KG ? "KG" : "LBS"; + QString length = prefs.units.length == units::METERS ? "METER" : "FEET"; + QString pressure = prefs.units.pressure == units::BAR ? "BAR" : "PSI"; + QString volume = prefs.units.volume == units::LITER ? "LITER" : "CUFT"; + QString temperature = prefs.units.temperature == units::CELSIUS ? "CELSIUS" : "FAHRENHEIT"; + QString weight = prefs.units.weight == units::KG ? "KG" : "LBS"; out << "\"unit_system\":\"Personalize\","; out << "\"units\":{\"depth\":\"" << length << "\",\"pressure\":\"" << pressure << "\",\"volume\":\"" << volume << "\",\"temperature\":\"" << temperature << "\",\"weight\":\"" << weight << "\"}"; }