diff options
author | Minwoo, Lee <minwoo47.lee@samsung.net> | 2015-06-22 11:47:22 +0200 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2015-06-22 12:36:57 +0200 |
commit | 1886838fb47940bcc3e90c855c71024323e7dd9e (patch) | |
tree | b7ba7b5afa7d4159e5c46ac473f21bdb99da649c | |
parent | 3b51ab1f1a7ebc7b8dcb4461fef8648515bb9829 (diff) | |
download | elementary-1886838fb47940bcc3e90c855c71024323e7dd9e.tar.gz |
elm_entry: modify to not allocate Eina_Rectangle
Summary: modify to not allocate Eina_Rectangle and use it directly on the stack with EINA_RECTANGLE_SET
Reviewers: raster, woohyun, cedric
Reviewed By: cedric
Differential Revision: https://phab.enlightenment.org/D2737
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r-- | src/lib/elm_entry.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index 6b8002b74..1724cb61a 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -439,15 +439,14 @@ _viewport_region_get(Evas_Object *obj) { if (eo_isa(parent, ELM_INTERFACE_SCROLLABLE_MIXIN)) { - Eina_Rectangle *pr = eina_rectangle_new(0, 0, 0, 0); - evas_object_geometry_get(parent, &pr->x, &pr->y, &pr->w, &pr->h); - if (!eina_rectangle_intersection(rect, pr)) + Eina_Rectangle r; + EINA_RECTANGLE_SET(&r, 0, 0, 0, 0); + evas_object_geometry_get(parent, &r.x, &r.y, &r.w, &r.h); + if (!eina_rectangle_intersection(rect, &r)) { rect->x = rect->y = rect->w = rect->h = 0; - eina_rectangle_free(pr); break; } - eina_rectangle_free(pr); } parent = elm_widget_parent_get(parent); } |