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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-09-02 21:21:29 +02:00 committed by Dirk Hohndel
parent 2635673c3a
commit 2bd0c2143e
5 changed files with 9 additions and 9 deletions

View file

@ -273,7 +273,7 @@ void put_HTML_depth(struct membuffer *b, struct dive *dive, const char *pre, con
{
const char *unit;
double value;
struct units *units_p = get_units();
const struct units *units_p = get_units();
if (!dive->maxdepth.mm) {
put_format(b, "%s--%s", pre, post);