On 03/07/14 04:57, Chris Michael wrote:
> On 07/02/2014 01:46 PM, Tom Hacohen wrote:
>> We already had an argument about it on the ML a few months back.
>>
>> ((a == b) && !c)
>>
>> Is the correct way of doing it. You don't need to surround single (or
>> single negated) expressions with parenthesis. All of us hate it and find
>> it terribly annoying. It doesn't appear anywhere in the EFL except for
>> some pieces of code you managed to sneak in. :)
>>
>
> Well actually, it used to be done like that way back in the day (even
> before you were around so it's not about me "sneaking stuff in" and I'd
> appreciate it very much if you did not start making this personal).
>
> Opinions are like legs...we all have them. That being said, if this is
> No Longer the "norm" for EFL coding style, then someone fix the coding
> conventions page to reflect these new rules...

Yes, you provided us with these two arguments back in the old thread too:
https://www.mail-archive.com/enlightenment-devel@lists.sourceforge.net/msg52916.html

It was long enough, no need to repeat it here. There is was made clear 
that this is not the case any more even if it ever was.

You are right though that someone put it in the conventions document on 
phab (ECoding), however the conventions were wrong and are now fixed.
>
>> So for example:
>> -   if (enc && enc->crtc_id)
>> +   if ((enc) && (enc->crtc_id))
>>
>> Is completely wrong.
>>
>
> Well, nothing "technically" wrong with it ... One person's preference
> over another is all...

Nothing is technically wrong with using 9 spaces as indentation or 
putting all of your code in one line, however these are the coding 
conventions we've decided to adhere to.

>
> I am sure this thread is probably going to go on for a few more months
> ... all over a coding style "preference". In that process, lets not
> forget the 1 golden rule with EFL style...

No, because it already did, a while back (link above).

>
> <quote>
> General rules
>
>      ALWAYS KEEP EXISTING CODING STYLE Even if it's different from this,
> do not change existing coding style as you introduce new code. If you
> want, send different/sequential patches. New code should always keep the
> coding style of its surroundings;
> </quote>

Ecore-drm is all new code you created, there was no "existing coding 
style". :)

>
> Fix the coding page to reflect the new style and enough with this thread !!

Fixed, and I agree.

--
Tom.

>
> dh
>
>
>> --
>> Tom.
>>
>> On 02/07/14 11:57, Chris Michael wrote:
>>> On 07/02/2014 03:17 AM, Stefan Schmidt wrote:
>>>> Hello.
>>>>
>>>> On Tue, 2014-07-01 at 08:00, Christopher Michael wrote:
>>>>> devilhorns pushed a commit to branch master.
>>>>>
>>>>> http://git.enlightenment.org/core/efl.git/commit/?id=e1e8859aa0d73261de6fa003bfe45959be589818
>>>>>
>>>>>
>>>>> commit e1e8859aa0d73261de6fa003bfe45959be589818
>>>>> Author: Chris Michael <cp.mich...@samsung.com>
>>>>> Date:   Tue Jul 1 10:58:44 2014 -0400
>>>>>
>>>>>        ecore-drm: Fix formatting from a7428edeb41efe67b0a
>>>>>
>>>>>        Fix horrible formatting before it gets too far...
>>>>>        Bad Stefan, no cookie ;)
>>>>
>>>> :)
>>>>
>>>>>        Signed-off-by: Chris Michael <cp.mich...@samsung.com>
>>>>> ---
>>>>>     src/lib/ecore_drm/ecore_drm_output.c | 4 ++--
>>>>>     1 file changed, 2 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/src/lib/ecore_drm/ecore_drm_output.c
>>>>> b/src/lib/ecore_drm/ecore_drm_output.c
>>>>> index 8f10614..bf1cca6 100644
>>>>> --- a/src/lib/ecore_drm/ecore_drm_output.c
>>>>> +++ b/src/lib/ecore_drm/ecore_drm_output.c
>>>>> @@ -216,12 +216,12 @@ _ecore_drm_output_crtc_find(Ecore_Drm_Device
>>>>> *dev, drmModeRes *res, drmModeConne
>>>>>        else
>>>>>          enc = NULL;
>>>>>
>>>>> -   if (enc && enc->crtc_id)
>>>>> +   if ((enc) && (enc->crtc_id))
>>>>
>>>> That is really only your taste. The braces are not needed here. Not a
>>>> coding style issue. :)
>>>
>>> Odd, this page says otherwise ;)
>>>
>>> https://phab.enlightenment.org/w/coding_convention/
>>>
>>> "use parenthesis for every clause or math;"
>>>
>>> Add parenthesis around all conditions:
>>>
>>> if (a) ...
>>> if (!a) ...
>>> if ((a) && (b))...
>>> if ((!a) && (b))...
>>>
>>>
>>>>
>>>>>          {
>>>>>             crtc = enc->crtc_id;
>>>>>             drmModeFreeEncoder(enc);
>>>>>             /* Check is this CRTC is already allocated */
>>>>> -        if  (!(dev->crtc_allocator & (1 << crtc)))
>>>>> +        if (!(dev->crtc_allocator & (1 << crtc)))
>>>>
>>>> Yeah, my bad. :)
>>>>
>>>
>>> No Worries ;)
>>>
>>> dh
>>>
>>>> regards
>>>> Stefan Schmidt
>>>>
>>>
>
>
>



------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to