value size is stored in type, no need to manually specify them.

This commit is contained in:
Gustavo Sverzut Barbieri 2017-08-15 18:59:50 -03:00
parent dee65b525c
commit 4cd1257b1b
1 changed files with 1 additions and 7 deletions

View File

@ -35,13 +35,7 @@
static inline size_t
eina_value_util_type_size(const Eina_Value_Type *type)
{
if (type == EINA_VALUE_TYPE_INT) return sizeof(int32_t);
if (type == EINA_VALUE_TYPE_UCHAR) return sizeof(unsigned char);
if ((type == EINA_VALUE_TYPE_STRING) || (type == EINA_VALUE_TYPE_STRINGSHARE)) return sizeof(char*);
if (type == EINA_VALUE_TYPE_TIMESTAMP) return sizeof(time_t);
if (type == EINA_VALUE_TYPE_ARRAY) return sizeof(Eina_Value_Array);
if (type == EINA_VALUE_TYPE_DOUBLE) return sizeof(double);
if (type == EINA_VALUE_TYPE_STRUCT) return sizeof(Eina_Value_Struct);
if (type) return type->value_size;
return 0;
}