Passes make, make check and a full make doc.

---

** [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:** Dan Eble


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);

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 [email protected] 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/testlilyissues-auto
  • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development
    • ... Auto mailings of changes to Lily Issues via Testlilyissues-auto via Automated messages for lilypond development

Reply via email to