efreet: fix signed warning

Update to 6a0d23. Casting to int isn't a real solution, since we could
have values which overflows.

Since we want the absolute value, just make sure we subtract the larger
value from the smaller.
This commit is contained in:
Sebastian Dransfeld 2015-05-11 13:31:21 +02:00
parent 3433c1449e
commit 9e0a00d768
1 changed files with 4 additions and 1 deletions

View File

@ -612,7 +612,10 @@ static double
efreet_icon_size_distance(Efreet_Cache_Icon_Element *elem, unsigned int size)
{
if (elem->type == EFREET_ICON_SIZE_TYPE_FIXED)
return (abs((int) elem->normal - (int) size));
{
if (elem->normal > size) return elem->normal - size;
else return size - elem->normal;
}
if ((elem->type == EFREET_ICON_SIZE_TYPE_SCALABLE) ||
(elem->type == EFREET_ICON_SIZE_TYPE_THRESHOLD))