mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Refactoring: Improve Naming of FRACTION and SIGNED_FRAC defines.
Make it more obvious that the FRACTION and SIGNED_FRAC defines return a tuple / triplet of values. Fixes https://github.com/subsurface/subsurface/pull/4171#discussion_r1585941133 Complained-about-by: @bstoeger Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
parent
32a08735c3
commit
e65c7cedc8
16 changed files with 57 additions and 57 deletions
|
@ -1177,7 +1177,7 @@ int DivePlannerPointsModel::analyzeVariations(struct decostop *min, struct decos
|
|||
rightsum = maxsum - midsum;
|
||||
|
||||
#ifdef DEBUG_STOPVAR
|
||||
printf("Total + %d:%02d/%s +- %d s/%s\n\n", FRACTION((leftsum + rightsum) / 2, 60), unit,
|
||||
printf("Total + %d:%02d/%s +- %d s/%s\n\n", FRACTION_TUPLE((leftsum + rightsum) / 2, 60), unit,
|
||||
(rightsum - leftsum) / 2, unit);
|
||||
#else
|
||||
Q_UNUSED(unit)
|
||||
|
@ -1266,8 +1266,8 @@ void DivePlannerPointsModel::computeVariations(struct diveplan *original_plan, c
|
|||
|
||||
char buf[200];
|
||||
sprintf(buf, ", %s: %c %d:%02d /%s %c %d:%02d /min", qPrintable(tr("Stop times")),
|
||||
SIGNED_FRAC(analyzeVariations(shallower, original, deeper, qPrintable(depth_units)), 60), qPrintable(depth_units),
|
||||
SIGNED_FRAC(analyzeVariations(shorter, original, longer, qPrintable(time_units)), 60));
|
||||
SIGNED_FRAC_TRIPLET(analyzeVariations(shallower, original, deeper, qPrintable(depth_units)), 60), qPrintable(depth_units),
|
||||
SIGNED_FRAC_TRIPLET(analyzeVariations(shorter, original, longer, qPrintable(time_units)), 60));
|
||||
|
||||
// By using a signal, we can transport the variations to the main thread.
|
||||
emit variationsComputed(QString(buf));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue