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

Issue 583320043: Issue 5659: Clean up to_string () etc. (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
Reviewers:
lemzwerg
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

https://sourceforge.net/p/testlilyissues/issues/5659/ C++11 provides std::to_string () overloaded for basic integer types. This set of changes removes similar global functions from flower to avoid ambiguity. There is some other general clean-up in here, but it's all related to strings. 1: Remove some unused string-related functions 2: Remove String_convert::char_string Where necessary, construct a std::string directly. 3: Delete ::to_string (const string&) 4: Delete ::to_string(char, ssize_t) 5: Delete ::to_string (bool b) 6: Delete ::to_string (i) for various integer types 7: Finally remove deleted ::to_string () overloads 8: Remove Interval<T>::T_to_string () This has an example of a technique that was not previously usable because of ambiguity between std::to_string () and ::to_string ().

Patch Set 1 : Remove some unused string-related functions #

Patch Set 2 : Remove String_convert::char_string #

Patch Set 3 : Delete ::to_string (const string&) #

Patch Set 4 : Delete ::to_string(char, ssize_t) #

Patch Set 5 : Delete ::to_string (bool) #

Patch Set 6 : Delete ::to_string (i) for various integer types #

Patch Set 7 : Finally remove deleted ::to_string () overloads #

Patch Set 8 : Remove Interval_t<T>::T_to_string () #

Total comments: 2

Patch Set 9 : Werner's feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -338 lines) Patch
M flower/file-name.cc View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -4 lines 0 comments Download
M flower/file-path.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M flower/getopt-long.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M flower/include/interval.hh View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M flower/include/interval.tcc View 1 2 3 4 5 6 7 1 chunk +5 lines, -3 lines 0 comments Download
M flower/include/rational.hh View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M flower/include/std-string.hh View 1 2 3 4 5 6 1 chunk +2 lines, -10 lines 0 comments Download
M flower/include/string-convert.hh View 1 2 3 4 5 1 chunk +0 lines, -10 lines 0 comments Download
M flower/interval.cc View 1 2 3 4 5 6 7 2 chunks +0 lines, -14 lines 0 comments Download
M flower/offset.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M flower/rational.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M flower/std-string.cc View 1 2 3 4 5 2 chunks +0 lines, -65 lines 0 comments Download
M flower/string-convert.cc View 1 2 3 4 5 8 chunks +12 lines, -135 lines 0 comments Download
M lily/arpeggio.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M lily/duration.cc View 1 2 3 4 5 1 chunk +4 lines, -3 lines 0 comments Download
M lily/flag.cc View 1 2 3 4 5 2 chunks +3 lines, -4 lines 0 comments Download
M lily/grob-interface.cc View 1 2 2 chunks +5 lines, -7 lines 0 comments Download
M lily/include/misc.hh View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M lily/include/moment.hh View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M lily/input.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M lily/lilypond-version.cc View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M lily/mensural-ligature.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M lily/midi-item.cc View 1 2 3 4 5 7 chunks +26 lines, -26 lines 0 comments Download
M lily/note-head.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M lily/page-turn-page-breaking.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M lily/paper-column.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M lily/paper-column-engraver.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M lily/performance.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M lily/pitch.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M lily/program-option-scheme.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -6 lines 0 comments Download
M lily/relocate.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M lily/rest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M lily/simultaneous-music-iterator.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M lily/source-file.cc View 1 2 3 4 5 2 chunks +7 lines, -6 lines 0 comments Download
M lily/system.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M lily/system-start-delimiter.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M lily/template5.cc View 1 2 3 4 5 6 7 2 chunks +0 lines, -14 lines 0 comments Download
M lily/volta-repeat-iterator.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 11
Dan Eble
Remove String_convert::char_string
4 years, 3 months ago (2020-01-11 20:05:30 UTC) #1
Dan Eble
Delete ::to_string (const string&)
4 years, 3 months ago (2020-01-11 20:06:22 UTC) #2
Dan Eble
Delete ::to_string(char, ssize_t)
4 years, 3 months ago (2020-01-11 20:06:55 UTC) #3
Dan Eble
Delete ::to_string (bool b)
4 years, 3 months ago (2020-01-11 20:07:17 UTC) #4
Dan Eble
Delete ::to_string (i) for various integer types
4 years, 3 months ago (2020-01-11 20:07:58 UTC) #5
Dan Eble
Finally remove deleted ::to_string () overloads
4 years, 3 months ago (2020-01-11 20:08:38 UTC) #6
Dan Eble
Remove Interval<T>::T_to_string ()
4 years, 3 months ago (2020-01-11 20:09:26 UTC) #7
lemzwerg
LGTM, thanks! https://codereview.appspot.com/583320043/diff/581420044/flower/file-name.cc File flower/file-name.cc (right): https://codereview.appspot.com/583320043/diff/581420044/flower/file-name.cc#newcode124 flower/file-name.cc:124: s += ext_; any reason to use ...
4 years, 3 months ago (2020-01-11 22:20:35 UTC) #8
Dan Eble
https://codereview.appspot.com/583320043/diff/581420044/flower/file-name.cc File flower/file-name.cc (right): https://codereview.appspot.com/583320043/diff/581420044/flower/file-name.cc#newcode124 flower/file-name.cc:124: s += ext_; On 2020/01/11 22:20:34, lemzwerg wrote: > ...
4 years, 3 months ago (2020-01-12 00:20:03 UTC) #9
lemzwerg
> s += EXTSEP; // append a char to s > s += ext_; // ...
4 years, 3 months ago (2020-01-12 07:44:42 UTC) #10
Dan Eble
4 years, 3 months ago (2020-01-12 19:30:07 UTC) #11
Werner's feedback
Sign in to reply to this message.

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