forked from enlightenment/efl
value size is stored in type, no need to manually specify them.
This commit is contained in:
parent
dee65b525c
commit
4cd1257b1b
|
@ -35,13 +35,7 @@
|
||||||
static inline size_t
|
static inline size_t
|
||||||
eina_value_util_type_size(const Eina_Value_Type *type)
|
eina_value_util_type_size(const Eina_Value_Type *type)
|
||||||
{
|
{
|
||||||
if (type == EINA_VALUE_TYPE_INT) return sizeof(int32_t);
|
if (type) return type->value_size;
|
||||||
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);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue