From 2bd0c2143ecfca36ffa38b48d89dad7c57634ea9 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 2 Sep 2018 21:21:29 +0200 Subject: Cleanup: constify get_units() get_units() returns a pointer to the units struct in the preferences. Callers should not modify the preferences via this struct, therefore make the return value point to const. This is a small step in constifying the global preferences structure. Signed-off-by: Berthold Stoeger --- desktop-widgets/divelogexportdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/divelogexportdialog.cpp b/desktop-widgets/divelogexportdialog.cpp index 2dbbe3817..9c21c4ff3 100644 --- a/desktop-widgets/divelogexportdialog.cpp +++ b/desktop-widgets/divelogexportdialog.cpp @@ -232,7 +232,7 @@ void DiveLogExportDialog::export_TeX(const char *filename, const bool selected_o FILE *f; QDir texdir = QFileInfo(filename).dir(); struct dive *dive; - struct units *units = get_units(); + const struct units *units = get_units(); const char *unit; int i; bool need_pagebreak = false; -- cgit v1.2.3-70-g09d2