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

Issue 553740043: flower: Clean up libc-extension (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 1 month ago by hahnjo
Modified:
4 years ago
Reviewers:
Dan Eble, lemzwerg, hanwenn
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

flower: Clean up libc-extension Individual commits: 1) Remove unused includes of libc-extension.hh 2) Rewrite String_convert::to_upper, ::to_lower via std::transform 3) Rename my_round to round_halfway_up The function differs from std::round() in the handling of negative numbers: While std::round() rounds halfway cases away from zero, round_halfway_up (as the name suggests) rounds them up for historic reasons. This can apparently be relied upon at least when manually positioning ties (input/regression/tie-single-manual.ly). In the long run, these cases should be identified and taken care of individually. Keep this function for the time being, but DO NOT USE in newly written code. While passing by, move some system headers last (this helps avoid issues that one of LilyPond's headers depends on other system headers being loaded first) and add them if apparently used in the file.

Patch Set 1 #

Total comments: 4

Patch Set 2 : Rename my_round() to round_halfway_up() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -83 lines) Patch
D flower/include/libc-extension.hh View 1 1 chunk +12 lines, -9 lines 0 comments Download
M flower/libc-extension.cc View 1 1 chunk +2 lines, -30 lines 0 comments Download
M flower/rational.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M flower/string-convert.cc View 1 2 chunks +10 lines, -12 lines 0 comments Download
M lily/beam-quanting.cc View 1 3 chunks +9 lines, -6 lines 0 comments Download
M lily/bezier.cc View 1 chunk +0 lines, -1 line 0 comments Download
M lily/general-scheme.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M lily/lily-guile.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M lily/midi-cc-announcer.cc View 1 2 chunks +8 lines, -4 lines 0 comments Download
M lily/midi-item.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M lily/pango-select.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M lily/paper-def.cc View 1 3 chunks +7 lines, -3 lines 0 comments Download
M lily/simple-spacer.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M lily/slur-configuration.cc View 1 3 chunks +8 lines, -1 line 0 comments Download
M lily/slur-scoring.cc View 1 3 chunks +9 lines, -3 lines 0 comments Download
M lily/spanner.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M lily/staff-symbol-referencer.cc View 1 chunk +0 lines, -1 line 0 comments Download
M lily/staff-symbol-referencer-scheme.cc View 1 2 chunks +5 lines, -1 line 0 comments Download
M lily/stencil-scheme.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M lily/tie-formatting-problem.cc View 1 4 chunks +9 lines, -3 lines 0 comments Download
M lily/tie-specification.cc View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 8
hahnjo
https://codereview.appspot.com/553740043/diff/547780043/input/regression/tie-single-manual.ly File input/regression/tie-single-manual.ly (right): https://codereview.appspot.com/553740043/diff/547780043/input/regression/tie-single-manual.ly#newcode19 input/regression/tie-single-manual.ly:19: \override Tie.staff-position = #-7.4 I'm not really happy about ...
4 years, 1 month ago (2020-03-17 21:06:42 UTC) #1
hanwenn
https://codereview.appspot.com/553740043/diff/547780043/input/regression/tie-single-manual.ly File input/regression/tie-single-manual.ly (right): https://codereview.appspot.com/553740043/diff/547780043/input/regression/tie-single-manual.ly#newcode19 input/regression/tie-single-manual.ly:19: \override Tie.staff-position = #-7.4 On 2020/03/17 21:06:42, hahnjo wrote: ...
4 years, 1 month ago (2020-03-17 21:27:52 UTC) #2
lemzwerg
https://codereview.appspot.com/553740043/diff/547780043/input/regression/tie-single-manual.ly File input/regression/tie-single-manual.ly (right): https://codereview.appspot.com/553740043/diff/547780043/input/regression/tie-single-manual.ly#newcode19 input/regression/tie-single-manual.ly:19: \override Tie.staff-position = #-7.4 > I'm not really happy ...
4 years, 1 month ago (2020-03-17 21:28:35 UTC) #3
hahnjo
On 2020/03/17 21:27:52, hanwenn wrote: > https://codereview.appspot.com/553740043/diff/547780043/input/regression/tie-single-manual.ly > File input/regression/tie-single-manual.ly (right): > > https://codereview.appspot.com/553740043/diff/547780043/input/regression/tie-single-manual.ly#newcode19 > ...
4 years, 1 month ago (2020-03-17 21:36:41 UTC) #4
Dan Eble
Jonas, I'm low on energy, so I'm not going to review this now, but I ...
4 years, 1 month ago (2020-03-18 00:17:12 UTC) #5
hahnjo
On 2020/03/18 00:17:12, Dan Eble wrote: > Jonas, > > I'm low on energy, so ...
4 years, 1 month ago (2020-03-18 07:20:32 UTC) #6
hahnjo
Rename my_round() to round_halfway_up()
4 years ago (2020-04-11 15:59:32 UTC) #7
hahnjo
4 years ago (2020-04-11 16:04:22 UTC) #8
On 2020/04/11 15:59:32, hahnjo wrote:
> Rename my_round() to round_halfway_up()

As promised, the updated patch keeps the functionality. However I've renamed the
function and added clear documentation that it should not be used in new code.
Sign in to reply to this message.

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