but instead we did a malloc, a double memcpy and a free. WTH ?
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@70593
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
if ((obj->cur.map) && (obj->cur.map->count == map->count))
{
- Evas_Map *omap = obj->cur.map;
- obj->cur.map = _evas_map_new(map->count);
- memcpy(obj->cur.map, omap, sizeof(Evas_Map) + (map->count * sizeof(Evas_Map_Point)));
+ /* We do have the same exact count of point in this map, so just copy it */
_evas_map_copy(obj->cur.map, map);
- if (obj->prev.map == omap) obj->prev.map = NULL;
- free(omap);
+ if (obj->prev.map == obj->cur.map) obj->prev.map = NULL;
}
else
{