D8971: Port from QDom to QXmlStreamReader

Anthony Fieroni noreply at phabricator.kde.org
Thu Nov 23 18:11:36 UTC 2017


anthonyfieroni added inline comments.

INLINE COMMENTS

> currency.cpp:713
> +                            const auto multiplier = attributes.value(QLatin1String("rate")).toDouble();
> +                            if (multiplier != 0) {
> +                                unit.setUnitMultiplier(1.0 / multiplier);

To compare double to int is never good idea, it can be even worst when compared it to double :)
So to be precise as well it should be

  if (multiplier > std::numeric_limits<double>::epsilon())

REPOSITORY
  R292 KUnitConversion

REVISION DETAIL
  https://phabricator.kde.org/D8971

To: broulik, #frameworks
Cc: anthonyfieroni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171123/b690ed5b/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list