summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2017-11-27 14:45:02 +0100
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-11-27 22:40:16 +0100
commit8212a923b22a8aa942c3b95ed1d4110bd6fd21a7 (patch)
treeef85a4859618a6fbffc7c3c3e07651bd616be19c
parentb17f1e2d302fda64c742042f2eb4765063d4c5f1 (diff)
downloadsubsurface-8212a923b22a8aa942c3b95ed1d4110bd6fd21a7.tar.gz
Use MAX_CYLINDERS consistently
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
-rw-r--r--desktop-widgets/tab-widgets/TabDiveStatistics.cpp2
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp
index 53bab0ef5..0582ec930 100644
--- a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp
+++ b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp
@@ -106,7 +106,7 @@ void TabDiveStatistics::updateData()
QString gasUsedString;
volume_t vol;
selectedDivesGasUsed(gasUsed);
- for (int j = 0; j < 20; j++) {
+ for (int j = 0; j < MAX_CYLINDERS; j++) {
if (gasUsed.isEmpty())
break;
QPair<QString, int> gasPair = gasUsed.last();
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp
index 244c6465a..80ee2d9f4 100644
--- a/desktop-widgets/tab-widgets/maintab.cpp
+++ b/desktop-widgets/tab-widgets/maintab.cpp
@@ -569,7 +569,7 @@ void MainTab::updateDiveInfo(bool clear)
QString gasUsedString;
volume_t vol;
selectedDivesGasUsed(gasUsed);
- for (int j = 0; j < 20; j++) {
+ for (int j = 0; j < MAX_CYLINDERS; j++) {
if (gasUsed.isEmpty())
break;
QPair<QString, int> gasPair = gasUsed.last();