[PATCH] Use gasmix getters in diveplanner.cpp as well

subsurface at henrik.synth.no subsurface at henrik.synth.no
Thu Jul 10 13:57:32 PDT 2014


From: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>

Signed-off-by: Henrik Brautaset Aronsen <subsurface at henrik.synth.no>
---
 qt-ui/diveplanner.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index dded7cb..0ea1578 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -35,7 +35,7 @@
 
 QString gasToStr(struct gasmix gas)
 {
-	uint o2 = (gas.o2.permille + 5) / 10, he = (gas.he.permille + 5) / 10;
+	uint o2 = (get_o2(&gas) + 5) / 10, he = (get_he(&gas) + 5) / 10;
 	QString result = gasmix_is_air(&gas) ? QObject::tr("AIR") : he == 0 ? QString("EAN%1").arg(o2, 2, 10, QChar('0')) : QString("%1/%2").arg(o2).arg(he);
 	return result;
 }
-- 
1.8.5.2 (Apple Git-48)



More information about the subsurface mailing list