cleanup: move definition of get_units() to core/unit.c

The function is declared in core/unit.h, therefore it seems logical
to define it in the corresponding source file.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-01-02 13:56:56 +01:00 committed by Dirk Hohndel
parent 966cd873c5
commit 91ffa5a59a
2 changed files with 6 additions and 5 deletions

View file

@ -110,11 +110,6 @@ int quit, force_root, ignore_bt;
char *testqml = NULL;
#endif
const struct units *get_units()
{
return &prefs.units;
}
/*
* track whether we switched to importing dives
*/

View file

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "units.h"
#include "gettext.h"
#include "pref.h"
int get_pressure_units(int mb, const char **units)
{
@ -168,3 +169,8 @@ double get_weight_units(unsigned int grams, int *frac, const char **units)
*units = unit;
return value;
}
const struct units *get_units()
{
return &prefs.units;
}