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

Issue 6496067: Creates getter and setter functions for buildings

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by MikeSol
Modified:
11 years, 8 months ago
Reviewers:
Graham Percival, dak
CC:
lilypond-devel_gnu.org
Base URL:
http://git.savannah.gnu.org/gitweb/?p=lilypond.git/trunk/
Visibility:
Public.

Description

Creates getter and setter functions for buildings This is a maintenance patch that will allow for safer experiments with optimizations of Buildings.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -77 lines) Patch
M lily/include/skyline.hh View 1 chunk +27 lines, -17 lines 1 comment Download
M lily/skyline.cc View 21 chunks +60 lines, -60 lines 1 comment Download

Messages

Total messages: 2
Graham Percival
http://codereview.appspot.com/6496067/diff/1/lily/include/skyline.hh File lily/include/skyline.hh (right): http://codereview.appspot.com/6496067/diff/1/lily/include/skyline.hh#newcode42 lily/include/skyline.hh:42: inline Real start () const { return start_; }; ...
11 years, 8 months ago (2012-08-31 10:20:04 UTC) #1
dak
11 years, 8 months ago (2012-08-31 12:11:18 UTC) #2
On 2012/08/31 10:20:04, Graham Percival wrote:
> http://codereview.appspot.com/6496067/diff/1/lily/include/skyline.hh
> File lily/include/skyline.hh (right):
> 
> http://codereview.appspot.com/6496067/diff/1/lily/include/skyline.hh#newcode42
> lily/include/skyline.hh:42: inline Real start () const { return start_; };
> hmm... I personally would call that
>   get_start()
> since I would expect
>   start()
> to begin some process inside the object.  (i.e. timer.start() )
> 
> http://codereview.appspot.com/6496067/diff/1/lily/skyline.cc
> File lily/skyline.cc (right):
> 
> http://codereview.appspot.com/6496067/diff/1/lily/skyline.cc#newcode221
> lily/skyline.cc:221: while (!s->empty () && start_x < b.end ())
> is there any performance penalty for using a function call instead of a value
> directly?  or does the C++ compiler optimize those out (especially since
they're
> const ?) ?

C++ compilers are expected to optimize most of those out in order not to taint
the reputation of the language's performance all too much.

GCC does this successfully enough that you can't even use most of those
functions in the debugger because no actually callable instance of the code has
been left in place.  Quite a nuisance in debugging.
Sign in to reply to this message.

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