Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9290)

Issue 569220043: Issue 5658: Include <cmath> consistently, not <math.h> (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 3 months ago by Dan Eble
Modified:
4 years, 3 months ago
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

https://sourceforge.net/p/testlilyissues/issues/5658/ In the past, we had problems with std::isinf and std::isnan not being provided by <cmath> because they are C++11 features, so we were including <math.h> in some places, and even potentially defining our own isinf. Now, we are using C++11. Because the code is also graced with "using namespace std;" all over the place (see issue 4550), ambiguity may arise. Using <cmath> consistently and removing our local definition of isinf should improve the situation.

Patch Set 1 : Include <cmath> consistently, not <math.h> #

Patch Set 2 : Remove our own definition of isinf() #

Patch Set 3 : Qualify isinf, isnan, isfinite with std:: #

Patch Set 4 : Cleanup: !isinf && !isnan == isfinite #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -108 lines) Patch
M config.hh.in View 1 1 chunk +0 lines, -3 lines 0 comments Download
M configure.ac View 1 1 chunk +1 line, -1 line 0 comments Download
M flower/include/interval.hh View 1 chunk +1 line, -1 line 0 comments Download
M flower/include/libc-extension.hh View 1 1 chunk +0 lines, -6 lines 0 comments Download
M flower/libc-extension.cc View 1 1 chunk +0 lines, -10 lines 0 comments Download
M flower/offset.cc View 1 2 2 chunks +8 lines, -8 lines 0 comments Download
M lily/accidental-placement.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M lily/axis-group-interface.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M lily/beam.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M lily/beam-quanting.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M lily/bezier.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M lily/break-alignment-interface.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M lily/chord-tremolo-engraver.cc View 1 chunk +0 lines, -1 line 0 comments Download
M lily/constrained-breaking.cc View 1 2 7 chunks +11 lines, -11 lines 0 comments Download
M lily/general-scheme.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M lily/grob.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M lily/lookup.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M lily/lyric-extender.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M lily/page-breaking.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M lily/page-layout-problem.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M lily/page-spacing.cc View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M lily/page-turn-engraver.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M lily/page-turn-page-breaking.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M lily/separation-item.cc View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M lily/side-position-interface.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M lily/simple-spacer.cc View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M lily/skyline.cc View 1 2 3 8 chunks +10 lines, -10 lines 0 comments Download
M lily/slur-scoring.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M lily/spaceable-grob.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M lily/spacing-spanner.cc View 1 chunk +1 line, -1 line 0 comments Download
M lily/spring.cc View 1 2 3 6 chunks +6 lines, -6 lines 0 comments Download
M lily/stem.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M lily/stem-tremolo.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M lily/stencil.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M lily/stencil-integral.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M lily/tie-configuration.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5
Dan Eble
Remove our own definition of isinf()
4 years, 3 months ago (2020-01-10 00:32:01 UTC) #1
lemzwerg
LGTM, thanks.
4 years, 3 months ago (2020-01-10 05:13:57 UTC) #2
michael.kaeppler
Passes 'make all' on my LilyDev1-image in VirtualBox. Regtests against current master ( e43878e2d40542bf492c7468fa68513162bc5972) as ...
4 years, 3 months ago (2020-01-10 14:05:10 UTC) #3
Dan Eble
Qualify isinf, isnan, isfinite with std::
4 years, 3 months ago (2020-01-11 02:54:48 UTC) #4
Dan Eble
4 years, 3 months ago (2020-01-11 02:55:42 UTC) #5
Cleanup: !isinf && !isnan == isfinite
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b