Skip to content

Commit

Permalink
fix(moneymanagerex#3865): format
Browse files Browse the repository at this point in the history
  • Loading branch information
vomikan committed Sep 18, 2021
1 parent e425661 commit f154229
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/mmhomepage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,9 @@ const wxString htmlWidgetIncomeVsExpenses::getHTMLText()
if (scaleStepWidth <= 1.0)
scaleStepWidth = 1.0;
else {
double s = (pow10(ceil(log10(scaleStepWidth)) - 1.0));
if (s > 0) scaleStepWidth = ceil(scaleStepWidth / s)*s;
double s = pow10(ceil(log10(scaleStepWidth)) - 1.0);
if (s > 0)
scaleStepWidth = ceil(scaleStepWidth / s)*s;
}

StringBuffer json_buffer;
Expand Down
2 changes: 1 addition & 1 deletion src/model/Model_Currency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const wxString Model_Currency::toString(double value, const Data* currency, int
precision = log10(currency ? currency->SCALE : GetBaseCurrency()->SCALE);
}

long long k = pow10(precision);
int k = pow10(precision);
long double v = value * k;
v = round(v) / k;

Expand Down

0 comments on commit f154229

Please sign in to comment.