[vlmc-devel] commit: TracksView: Fixing bad mouse releasing behaviour. ( Hugo Beauzée-Luyssen )

Hugo Beauzee-Luyssen beauze.h at gmail.com
Thu Dec 2 13:09:33 CET 2010


On Thu, Dec 2, 2010 at 1:00 PM, Ludovic Fauvet <etix at l0cal.com> wrote:
> On Tue, Nov 30, 2010 at 6:37 PM, Rohit Yadav <rohityadav89 at gmail.com> wrote:
>> Any good reason to use goto? Should n't we avoid labels? labels are bad...
>
> I don't see any problem for using goto in _this_ specific case.
> It improves the overall logic of the method, avoids code duplication
> and ensures that the mouseReleaseEvent is correctly propagated in any
> case.
>
>> Is that not possible by using a function or a #define or an inline if you
>> wish...?
>
> Again, for this specific case, I think that a #define is hackish and
> an (inline) method is pointless.
> But that is just my humble opinion of a not-so-active developer :-)
>
> Regards,


That is what I would have answered.
Labels ain't a bad thing, but it may be misused. In this case, i don't
feel too bad using it (though I thought the exact same thing not so
long ago)
"Labels are bad" is something I was taught at school, but that is
definitely not true.
Even if it would harm performances (which I strongly believe to be
false), this code is run when the user releases his mouse on the
timeline, which is not a critical part.

Regards,

-- 
Hugo Beauzée-Luyssen


More information about the Vlmc-devel mailing list