On Tue, Sep 12, 2017 at 9:05 PM, Vincent Torri <[email protected]> wrote:
> +static int
> +_eina_value_type_rectangle_compare(const Eina_Value_Type *type EINA_UNUSED, 
> const void *a, const void *b)
> +{
> +   const Eina_Rectangle *ra = a;
> +   const Eina_Rectangle *rb = b;
> +
> +   if (eina_rectangle_equal(ra, rb)) return 0;
> +   return -1;

maybe do other comparisons to allow better comparison (basically for
sorting), like compare x, y, w and h individually in that order.

> +EAPI const Eina_Value_Type _EINA_VALUE_TYPE_RECTANGLE = {
> +  EINA_VALUE_TYPE_VERSION,
> +  sizeof (Eina_Rectangle),
> +  "Eina_Value_Rectangle",

should be "Eina_Rectangle", like for int it's "int".


>  /**
> + * @var EINA_VALUE_TYPE_RECTANGLE
> + * manages optional type.

copy&paste... this should read "manages Eina_Rectangle values". Would
emphasize the value, not pointer to value.

Usually we add the explicit type in eina_value_get(),
eina_value_pget(), eina_value_vget(), eina_value_set(),
eina_value_pset() and eina_value_vset()... so users don't do mistakes.

(this would be the case for Eina_File, I forgot to comment in that review).


-- 
Gustavo Sverzut Barbieri
--------------------------------------
Mobile: +55 (16) 99354-9890

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to