lilypond-auto
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lilypond-auto] [LilyIssues-auto] [testlilyissues:issues] #5790 Rational


From: Auto mailings of changes to Lily Issues via Testlilyissues-auto
Subject: [Lilypond-auto] [LilyIssues-auto] [testlilyissues:issues] #5790 Rational conversion clean-up
Date: Sat, 29 Feb 2020 02:26:45 -0000

commit 1a061b0d2b7e3b50c8f2846008882325dfe1fec8
Author: Dan Eble <address@hidden>
Date:   Sat Feb 22 22:10:33 2020 -0500

    Issue 5790/8: Rational: to_int () becomes trunc_int ()

    ... and returns I64 like num () and den ().
commit f0e68ea3a9c8db6d7b81a3f7fd797804b26c9cbf
Author: Dan Eble <address@hidden>
Date:   Sat Feb 22 12:53:31 2020 -0500

    Issue 5790/7: Rational: disable implicit conversion to double

    This helps emphasize places where exactness might be lost.
commit 95bf2fde4b95969875dd2cfe96b4424175ca3885
Author: Dan Eble <address@hidden>
Date:   Sat Feb 22 12:53:31 2020 -0500

    Issue 5790/6: Rational: r.to_double () becomes 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);
commit 7cfd8a44caa6d7e1de02b0c8e3ffa501fb9f4bce
Author: Dan Eble <address@hidden>
Date:   Sat Feb 22 12:53:31 2020 -0500

    Issue 5790/5: Rational: disable implicit conversion to bool
commit b8028efa6daf9e2be3617bf6ff9dd8b13d303bb0
Author: Dan Eble <address@hidden>
Date:   Sat Feb 22 22:09:42 2020 -0500

    Issue 5790/4: Rational: disambiguate integer conversions

    ... and fix sign when initialized by unsigned integer
commit 532e06e784035bf3fdbedb590cf4e6fe070178e2
Author: Dan Eble <address@hidden>
Date:   Sat Feb 22 09:17:12 2020 -0500

    Issue 5790/3: Rational: use default copy-construction and assignment
commit 2a7c4146cac93710d02106c8f729b8e7333e656d
Author: Dan Eble <address@hidden>
Date:   Sat Feb 22 12:45:18 2020 -0500

    Issue 5790/2: Rational: remove unused infinity_rat
commit 8466b6dbc630d1862f193d081f6de7ae9a4a1d3d
Author: Dan Eble <address@hidden>
Date:   Fri Feb 21 18:26:04 2020 -0500

    Issue 5790/1: Rational: create unit tests

[issues:#5790] Rational conversion clean-up

Status: Fixed
Labels: Fixed_2_21_0
Created: Tue Feb 25, 2020 02:43 AM UTC by Dan Eble
Last Updated: Fri Feb 28, 2020 08:50 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);</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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]