lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remove redundant occurences of this-> (issue 258870043 by address@hi


From: dak
Subject: Re: Remove redundant occurences of this-> (issue 258870043 by address@hidden)
Date: Thu, 23 Jul 2015 06:33:07 +0000


https://codereview.appspot.com/258870043/diff/1/lily/grob.cc
File lily/grob.cc (right):

https://codereview.appspot.com/258870043/diff/1/lily/grob.cc#newcode232
lily/grob.cc:232: /* This version of get_system is more reliable than
get_system ()
On 2015/07/23 05:50:38, Keith wrote:
What do you mean by "get_system is more reliable than get_system ()" ?

The one-argument form of get_system is "more reliable" than the
zero-argument form of get_system.  You can perfectly well call the
one-element form with this->get_system (me) as well, given a suitable
this-pointer.  Or with me->get_system (me).

So the comment does not make less sense with regard to the actual
language definition than it did before.  It may be more apparent.

At any rate, providing two identically named member functions, one
static and one non-static (the latter of course makes use of the virtual
function table but that's not really obvious from the code and comments
here) seems like really bad interface design.

At any rate, this would need to be

  The static member function get_system (Grob *) is more reliable than
the non-static member function get_system ()

You can call either function using some this->get_system (...) call.

https://codereview.appspot.com/258870043/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]