aboutsummaryrefslogtreecommitdiffstats
path: root/core/dive.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-07-15 22:16:56 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-07-18 05:42:55 -0700
commitb862e028c6695e9adfdffc2b46ad3c433ec7f214 (patch)
tree79ab8cc4addc868daedc741dc688f4f38d1cffc6 /core/dive.c
parent342d04631eca0b2cc6138d2361e41a29ffb982e0 (diff)
downloadsubsurface-b862e028c6695e9adfdffc2b46ad3c433ec7f214.tar.gz
Cleanup: move cylinderuse_from_text() to equipment.c
Since this function doesn't act on a dive and is only related to cylinders, move it to equipment.c and equipment.h. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.c')
-rw-r--r--core/dive.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/core/dive.c b/core/dive.c
index b53982066..c353d196e 100644
--- a/core/dive.c
+++ b/core/dive.c
@@ -23,10 +23,6 @@
* here */
struct dive displayed_dive;
-const char *cylinderuse_text[NUM_GAS_USE] = {
- QT_TRANSLATE_NOOP("gettextFromC", "OC-gas"), QT_TRANSLATE_NOOP("gettextFromC", "diluent"), QT_TRANSLATE_NOOP("gettextFromC", "oxygen"), QT_TRANSLATE_NOOP("gettextFromC", "not used")
-};
-
// For user visible text but still not translated
const char *divemode_text_ui[] = {
QT_TRANSLATE_NOOP("gettextFromC", "Open circuit"),
@@ -567,15 +563,6 @@ void copy_cylinders(const struct dive *s, struct dive *d, bool used_only)
}
}
-int cylinderuse_from_text(const char *text)
-{
- for (enum cylinderuse i = 0; i < NUM_GAS_USE; i++) {
- if (same_string(text, cylinderuse_text[i]) || same_string(text, translate("gettextFromC", cylinderuse_text[i])))
- return i;
- }
- return -1;
-}
-
void copy_samples(const struct divecomputer *s, struct divecomputer *d)
{
/* instead of carefully copying them one by one and calling add_sample