On Tue, Jan 24, 2012 at 4:41 PM, Richard Heck <rgh...@comcast.net> wrote:

> On 01/24/2012 02:13 AM, Abdelrazak Younes wrote:
>
>  On Sat, Jan 21, 2012 at 10:02 PM, Richard Heck <rgh...@comcast.net<mailto:
>> rgh...@comcast.net>> wrote:
>>
>>
>>    Consider:
>>
>>    void Text::setFont(Cursor & cur, Font const & font)
>>    {
>>       LASSERT(this == cur.text(), /**/);
>>       // Set the current_font
>>       // Determine basis font
>>       FontInfo layoutfont;
>>
>>    Wouldn't it be better to return here if the assertion fails?
>>    Continuing seems like we're inviting disaster, whereas returning
>>    just aborts what we're doing.
>>
>>
>> Yes
>>
>>
>>    I've seen this same pattern a lot of places. I wouldn't propose to
>>    change all of them at once, but if this seems right we could try
>>    to change them as we see them.
>>
>>
>> IIRC, Andre introduced this fallback code in LASSERT. The goal is
>> eventually to have a fallback code everywhere, but not necessarily only
>> "return".
>>
>>  Right, so the default, when he did the change, was just to proceed. I
> assume that is what we do if there's only a comment?
>

Exactly.

Cheers,
Abdel.


>
> Richard
>
>

Reply via email to