mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: pass all parameters to weightsystem_t
With -Wextra, gcc/g++ complains that compound initialization of weightsystem_t misses the auto_filled parameter. Add it. For C++ code we might think about writing a constructor. However, we use two versions: with and without copied string. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
d89ef3d906
commit
c893d19ea4
5 changed files with 5 additions and 5 deletions
|
@ -636,7 +636,7 @@ static void wlog_compl_parser(struct memblock *wl_mem, struct dive *dt_dive, int
|
|||
*/
|
||||
tmp = (int) two_bytes_to_int(runner[pos_weight + 1], runner[pos_weight]);
|
||||
if (tmp != 0x7fff) {
|
||||
weightsystem_t ws = { {lrint(tmp * 10)}, QT_TRANSLATE_NOOP("gettextFromC", "unknown") };
|
||||
weightsystem_t ws = { {lrint(tmp * 10)}, QT_TRANSLATE_NOOP("gettextFromC", "unknown"), false };
|
||||
add_cloned_weightsystem(&dt_dive->weightsystems, ws);
|
||||
}
|
||||
|
||||
|
|
|
@ -305,7 +305,7 @@ static int divinglog_dive(void *param, int columns, char **data, char **column)
|
|||
state->cur_dive->watertemp.mkelvin = C_to_mkelvin(atol(data[9]));
|
||||
|
||||
if (data[10]) {
|
||||
weightsystem_t ws = { { atol(data[10]) * 1000 }, translate("gettextFromC", "unknown") };
|
||||
weightsystem_t ws = { { atol(data[10]) * 1000 }, translate("gettextFromC", "unknown"), false };
|
||||
add_cloned_weightsystem(&state->cur_dive->weightsystems, ws);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue