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

Issue 547560044: Cast to Real in C++ style throughout (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
2 weeks ago by hanwenn
Modified:
1 week ago
Reviewers:
Dan Eble, dak
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Cast to Real in C++ style throughout

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -20 lines) Patch
M flower/cpu-timer.cc View 1 chunk +2 lines, -1 line 0 comments Download
M flower/include/drul-array.hh View 1 chunk +2 lines, -2 lines 0 comments Download
M lily/bracket.cc View 1 chunk +1 line, -1 line 0 comments Download
M lily/freetype.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M lily/midi-walker.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M lily/open-type-font.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M lily/pango-font.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M lily/pitch.cc View 1 chunk +1 line, -1 line 0 comments Download
M lily/spring.cc View 2 chunks +3 lines, -4 lines 2 comments Download
M lily/stem.cc View 1 chunk +2 lines, -1 line 0 comments Download
M lily/volta-bracket.cc View 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 3
Dan Eble
LGTM https://codereview.appspot.com/547560044/diff/555240043/lily/spring.cc File lily/spring.cc (right): https://codereview.appspot.com/547560044/diff/555240043/lily/spring.cc#newcode119 lily/spring.cc:119: avg_stretch /= static_cast<Real> (springs.size ()); This is not ...
2 weeks ago (2020-02-02 18:51:08 UTC) #1
dak
On 2020/02/02 18:51:08, Dan Eble wrote: > LGTM > > https://codereview.appspot.com/547560044/diff/555240043/lily/spring.cc > File lily/spring.cc (right): ...
2 weeks ago (2020-02-02 19:08:59 UTC) #2
hanwenn
1 week, 6 days ago (2020-02-02 20:00:36 UTC) #3
https://codereview.appspot.com/547560044/diff/555240043/lily/spring.cc
File lily/spring.cc (right):

https://codereview.appspot.com/547560044/diff/555240043/lily/spring.cc#newcod...
lily/spring.cc:119: avg_stretch /= static_cast<Real> (springs.size ());
On 2020/02/02 18:51:08, Dan Eble wrote:
> This is not an issue with this change, but should this function do something
> other than divide by zero when springs is empty?

what is the average of an empty set of numbers?

the 2 callers use a fallback in case there are not springs.
Sign in to reply to this message.

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