aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-08-30 06:54:41 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-08-30 06:54:41 -0300
commit6c56f0795923453f2502637d6f7ddda59190bc2d (patch)
tree26ae14290f0ba4c5842d0c614dca435dc8eda9f7
parent2921f4c825139838617a88f89002ed9b80a4b435 (diff)
downloadsubsurface-6c56f0795923453f2502637d6f7ddda59190bc2d.tar.gz
Code Cleanup - Remove temporaries.
Just code cleanup, removing temporaries. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
-rw-r--r--qt-ui/diveplanner.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index cef1e7f4e..9fadd53c0 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -412,16 +412,10 @@ void DivePlannerGraphics::createDecoStops()
int rowCount = plannerModel->rowCount();
int lastIndex = -1;
for(int i = 0; i < rowCount; i++){
- // TODO: Dirk, the values already exists on the interface in the form of strings, can you
- // give me a bit of help here?
- divedatapoint thisPoint = plannerModel->at(i);
-
- int o2 = thisPoint.o2;
- int he = thisPoint.he;
- int po2 = thisPoint.po2;
- int deltaT = lastIndex != -1 ? thisPoint.time - plannerModel->at(lastIndex).time : thisPoint.time;
+ divedatapoint p = plannerModel->at(i);
+ int deltaT = lastIndex != -1 ? p.time - plannerModel->at(lastIndex).time : p.time;
lastIndex = i;
- dp = plan_add_segment(&diveplan, deltaT, thisPoint.depth, o2, he, po2);
+ dp = plan_add_segment(&diveplan, deltaT, p.depth, p.o2, p.he, p.po2);
}