[Kmymoney-devel] Review Request: Drop usage of 'long double' and use qRound64 instead of round.

Cristian Oneț onet.cristian at gmail.com
Wed Feb 22 22:43:15 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104044/
-----------------------------------------------------------

(Updated Feb. 22, 2012, 10:43 p.m.)


Review request for KMymoney.


Description
-------

Using 'long double' MyMoneyFinancialCalculator is pretty awkward since it's values can be either 'long double' or 'double' depending on the fact that the 'long double' type is found or not. But in the client code there is plain usage of the 'long double' type so the whole type detection seems useless.
It's also useless considering that MyMoneyMoney objects have a conversion to 'double' but no conversion to 'long double'.
So I decided that 'long double' should be removed (from the client code also), thus making the code cleaner without loosing anything (on some platforms 'long double' is just a typedef to 'double').
This also fixes the test failing on Windows on both MSVC and mingw4 platforms.
In the places where we need arbitrary precision (inside MyMoneyFinancialCalculator) the double types should be replaced with MyMoneyMoney objects anyway.


Diffs
-----

  CMakeLists.txt 9ea55de 
  config-kmymoney.h.cmake 75a79c0 
  kmymoney/mymoney/mymoneyfinancialcalculator.h 1fea9f6 
  kmymoney/mymoney/mymoneyfinancialcalculator.cpp eee28f8 
  kmymoney/mymoney/mymoneyforecast.cpp fe0cfdc 
  kmymoney/mymoney/mymoneymoney.h 3902c88 
  kmymoney/wizards/newaccountwizard/knewaccountwizard.cpp a35cb16 
  kmymoney/wizards/newaccountwizard/knewaccountwizard_p.h 0575771 
  kmymoney/wizards/newloanwizard/durationwizardpage.h 6781b88 
  kmymoney/wizards/newloanwizard/durationwizardpage.cpp c68fac8 
  kmymoney/wizards/newloanwizard/knewloanwizard.cpp e473e4a 

Diff: http://git.reviewboard.kde.org/r/104044/diff/


Testing
-------

Ran tests on Linux/Windows(MSVC and mingw4) and they all passed.


Thanks,

Cristian Oneț

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20120222/b4aeae9d/attachment.html>


More information about the KMyMoney-devel mailing list