diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-08-13 22:30:36 +0200 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2019-09-14 13:20:59 +0200 |
commit | 981c23070693b69a3b6a854a41cc91c8516abb95 (patch) | |
tree | 1ea986a8932da8cf9b3add850757e437cdc29cb2 | |
parent | 06974f1a2c601922ac9cdca01a87c3ed023cac5c (diff) | |
download | subsurface-981c23070693b69a3b6a854a41cc91c8516abb95.tar.gz |
Cleanup: make cylinder_t argument to CylinderObjectHelper const
CylinderObjectHelper copies state from the passed in cylinder_t
but does not modify it.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r-- | core/subsurface-qt/CylinderObjectHelper.cpp | 2 | ||||
-rw-r--r-- | core/subsurface-qt/CylinderObjectHelper.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/subsurface-qt/CylinderObjectHelper.cpp b/core/subsurface-qt/CylinderObjectHelper.cpp index f8386c402..28c14e10a 100644 --- a/core/subsurface-qt/CylinderObjectHelper.cpp +++ b/core/subsurface-qt/CylinderObjectHelper.cpp @@ -3,7 +3,7 @@ #include "../qthelper.h" static QString EMPTY_CYLINDER_STRING = QStringLiteral(""); -CylinderObjectHelper::CylinderObjectHelper(cylinder_t *cylinder) +CylinderObjectHelper::CylinderObjectHelper(const cylinder_t *cylinder) { if (!cylinder) return; diff --git a/core/subsurface-qt/CylinderObjectHelper.h b/core/subsurface-qt/CylinderObjectHelper.h index f7df7f746..e1e2490e4 100644 --- a/core/subsurface-qt/CylinderObjectHelper.h +++ b/core/subsurface-qt/CylinderObjectHelper.h @@ -15,7 +15,7 @@ class CylinderObjectHelper { Q_PROPERTY(QString endPressure MEMBER endPressure CONSTANT) Q_PROPERTY(QString gasMix MEMBER gasMix CONSTANT) public: - CylinderObjectHelper(cylinder_t *cylinder = NULL); + CylinderObjectHelper(const cylinder_t *cylinder = NULL); QString description; QString size; QString workingPressure; |