aboutsummaryrefslogtreecommitdiffstats
path: root/core/prefs-macros.h
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2017-11-21 15:52:01 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-11-24 07:56:10 -0800
commitbd8830672269297f7030670e10f2191ac824093f (patch)
tree36bea72af67273a7516a8d473616995b5bef96b7 /core/prefs-macros.h
parent178dcbc0c693fc1d7b9bf3988ec2f3ac5ff3f2f3 (diff)
downloadsubsurface-bd8830672269297f7030670e10f2191ac824093f.tar.gz
Change prefs.show_units_table to bool
Bool is the correct choice for this option. int was used before because it was not clear to me how and if I can use bool in this C file. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'core/prefs-macros.h')
-rw-r--r--core/prefs-macros.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/prefs-macros.h b/core/prefs-macros.h
index 7648580ef..6f1b665fd 100644
--- a/core/prefs-macros.h
+++ b/core/prefs-macros.h
@@ -18,11 +18,11 @@
else \
prefs.units.field = default_prefs.units.field
-#define GET_UNIT_INT(name, field) \
- v = s.value(QString(name)); \
- if (v.isValid()) \
- prefs.units.field = v.toInt(); \
- else \
+#define GET_UNIT_BOOL(name, field) \
+ v = s.value(QString(name)); \
+ if (v.isValid()) \
+ prefs.units.field = v.toBool(); \
+ else \
prefs.units.field = default_prefs.units.field
#define GET_BOOL(name, field) \