Bug 130977 - Drop rtl::math::isFinite in favor of std::isfinite
Summary: Drop rtl::math::isFinite in favor of std::isfinite
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Yukio Siraichi
URL:
Whiteboard: target:7.0.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2020-02-27 06:15 UTC by Mike Kaganski
Modified: 2020-03-12 09:56 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2020-02-27 06:15:32 UTC
std::isfinite is there since C++11 [1]. Let's replace home-grown rtl::math::isFinite (declared/defined in include/rtl/math.hxx) with this standard function.

[1] https://en.cppreference.com/w/cpp/numeric/math/isfinite
Comment 1 Stephan Bergmann 2020-02-27 07:52:05 UTC
It is fine to remove uses of that rtl::math function across the LO code base. 
But the function is part of the stable URE interface, so cannot easily itself
be removed.

(We can think about an [API CHANGE] to drop this and similar inline functions
from rtl/math.hxx once all of them are unused across the LO code base.)
Comment 2 Yukio Siraichi 2020-03-09 12:17:12 UTC
Can I take this issue as my first contribution?
Comment 3 Mike Kaganski 2020-03-09 12:20:59 UTC
(In reply to Yukio Siraichi from comment #2)

Of course, please assign it to you and proceed; looking forward to see your first contribution!
Comment 4 Yukio Siraichi 2020-03-11 06:14:46 UTC
So, I created a fix on gerrit, and apparently Jenkins accepted it. Should I assign the reviewers myself?

https://gerrit.libreoffice.org/c/core/+/90234
Comment 5 Commit Notification 2020-03-12 09:35:29 UTC
Yukio Siraichi committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8e173a965d5684372e3fe0ee3d3599032bcb86c2

tdf#130977 replace `rtl::math::isFinite` with `std::isfinite`.

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.