freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] [freetype2] master fc11af1: Various minor clang fixes.


From: Behdad Esfahbod
Subject: Re: [ft-devel] [freetype2] master fc11af1: Various minor clang fixes.
Date: Wed, 20 Jan 2016 12:23:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

On 16-01-20 12:03 PM, Werner LEMBERG wrote:
> 
>>> +#if 0
>>>        default:
>>>          GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT );
>>>          goto Exit;
>>> +#endif
>>
>> What's this?!
> 
> The `default' case is redundant, since all possible enum values are
> covered in the `switch' statement.

I personally prefer having code in front of me that I can prove correct, than
having to go fish for all the places that value in the switch statement is set
to convince myself that it can't possibly have any other value...

At any rate, having "#if 0" code like this is not a good idea as 5 years from
now no one will remember why that code is there and why it's disabled.



> Toshiya-san, shall I completely remove this code?
> 
> 
>     Werner 



reply via email to

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