"Vincent van Ravesteijn - TNW" writes:
> Because there is no reason to make it non-const. I can't think of a
> reason to allow code from outside the Cursor class to change the result
> of the Cursor dispatching machinery.
>
> If something can be const, it's better to make it a const, right ?
The
On 04/16/2010 10:22 AM, Jean-Marc Lasgouttes wrote:
Vincent van Ravesteijn writes:
One less copy than returning a "DispatchResult const&" ?
I think we think the same.. ;)
No, I am wondering why it has to be const.
Because it is dangerous otherwise. DispatchResult is not big so
>> One less copy than returning a "DispatchResult const &" ?
>>
>> I think we think the same.. ;)
>
>No, I am wondering why it has to be const.
>
Because there is no reason to make it non-const. I can't think of a
reason to allow code from outside the Cursor class to change the result
of the Curs
Vincent van Ravesteijn writes:
> One less copy than returning a "DispatchResult const &" ?
>
> I think we think the same.. ;)
No, I am wondering why it has to be const.
JMarc
Jean-Marc Lasgouttes schreef:
Le 15 avr. 10 à 23:23, Vincent van Ravesteijn a écrit :
Why not return a DispatchResult& ? I think that was the intent anyway.
Why would we. The only place from where the DispatchResult is changed
is within the Cursor class, so direct access to the private member.
Le 15 avr. 10 à 23:23, Vincent van Ravesteijn a écrit :
Why not return a DispatchResult& ? I think that was the intent
anyway.
Why would we. The only place from where the DispatchResult is
changed is within the Cursor class, so direct access to the private
member.
Beacuse it is one less
I made result() return a const & in order not to have anyone trying to
do this again.
Why not return a DispatchResult& ? I think that was the intent anyway.
Why would we. The only place from where the DispatchResult is changed is
within the Cursor class, so direct access to the private membe
Le 15 avr. 10 à 19:15, Vincent van Ravesteijn - TNW a écrit :
Author: lasgouttes
Date: Fri Nov 13 15:32:51 2009
New Revision: 31969
URL: http://www.lyx.org/trac/changeset/31969
+ // Is this a function that acts on inset at point?
+ if (lyxaction.funcHasFlag(cmd.action, LyXAct
>Author: lasgouttes
>Date: Fri Nov 13 15:32:51 2009
>New Revision: 31969
>URL: http://www.lyx.org/trac/changeset/31969
>
>+ // Is this a function that acts on inset at point?
>+ if (lyxaction.funcHasFlag(cmd.action, LyXAction::AtPoint)
>+ && nextInset()) {
>+