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
|
@ -1126,7 +1126,7 @@ void QMLManager::commitChanges(QString diveId, QString number, QString date, QSt
|
|||
// not sure what we'd do if there was more than one weight system
|
||||
// defined - for now just ignore that case
|
||||
if (d->weightsystems.nr == 0) {
|
||||
weightsystem_t ws = { { parseWeightToGrams(weight) } , strdup(qPrintable(tr("weight"))) };
|
||||
weightsystem_t ws = { { parseWeightToGrams(weight) } , strdup(qPrintable(tr("weight"))), false };
|
||||
add_to_weightsystem_table(&d->weightsystems, 0, ws); // takes ownership of the string
|
||||
} else if (d->weightsystems.nr == 1) {
|
||||
d->weightsystems.weightsystems[0].weight.grams = parseWeightToGrams(weight);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue