|
From: | Auto mailings of changes to Lily Issues via Testlilyissues-auto |
Subject: | [Lilypond-auto] [LilyIssues-auto] [testlilyissues:issues] #5790 Rational conversion clean-up |
Date: | Tue, 25 Feb 2020 02:43:51 -0000 |
[issues:#5790] Rational conversion clean-up
Status: Started
Created: Tue Feb 25, 2020 02:43 AM UTC by Dan Eble
Last Updated: Tue Feb 25, 2020 02:43 AM UTC
Owner: nobody
This review squashes these commits that mainly clean up initialization
and conversion of Rationals, though there are some minor bug fixes.
For most of the unit tests which are disabled here, I have fixes that
I am holding back for the sake of simplifying this review.
1: create unit tests
2: remove unused infinity_rat
3: use default copy-construction and assignment
4: disambiguate integer conversions
and fix sign when initialized by unsigned integer
5: disable implicit conversion to bool
6: discard r.to_double () in favor of static_cast<double> (r)
This helps developers avoid question-raising statements like this:
Real x = r.to_double ();
and encourages statements like this:
auto x = static_cast<real> (r);</real></double>
7: disable implicit conversion to double
This helps emphasize places where exactness might be lost.
8: to_int () becomes trunc_int ()
and returns I64 like num () and den ().
https://codereview.appspot.com/573570043
Sent from sourceforge.net because address@hidden is subscribed to https://sourceforge.net/p/testlilyissues/issues/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/testlilyissues/admin/issues/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
_______________________________________________ Testlilyissues-auto mailing list address@hidden https://lists.sourceforge.net/lists/listinfo/testlilyissues-auto
[Prev in Thread] | Current Thread | [Next in Thread] |