Changes between Version 16 and Version 17 of EFLWebKitCodingStyle


Ignore:
Timestamp:
Sep 13, 2012 12:21:48 AM (12 years ago)
Author:
Christophe Dumez
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EFLWebKitCodingStyle

    v16 v17  
    1010 * Use '''NULL''' in public C headers instead of 0
    1111 * Use a double negation '''(!!)''' when you modify or compare with a Eina Bool member variable which stores a value in a bit field.
     12 * *_ref() functions should return the ref'd object
    1213
    1314= Example =
     
    249250}
    250251}}}
     252
     253== *_ref() functions should return the ref'd object. ==
     254
     255This makes them more convenient to use and results in less code.
     256
     257=== Right ===
     258{{{
     259#!cpp
     260EAPI Ewk_Web_Resource *ewk_web_resource_ref(Ewk_Web_Resource *resource);
     261[...]
     262resources.add(resourceID, ewk_web_resource_ref(ewkResource));
     263}}}
     264=== Wrong ===
     265{{{
     266#!cpp
     267EAPI void ewk_web_resource_ref(Ewk_Web_Resource *resource);
     268[...]
     269ewk_web_resource_ref(ewkResource)
     270resources.add(resourceID, ewkResource);
     271}}}