tasn pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c3ee589b8f2faebb7dc25ddf3c461c075edec58c
commit c3ee589b8f2faebb7dc25ddf3c461c075edec58c Author: kabeer khan <kabeer.k...@samsung.com> Date: Tue Nov 25 09:55:36 2014 +0000 evas_object_textblock: Resolved FIXME replaced int with size_t Summary: Since Evas_Textblock_Cursor has pos of type size_t so changed pos argument in _find_layout_item_line_match from int to size_t Also Evas_Object_Textblock_Item has text_pos of size_t so defined variable p of type size_t Signed-off-by: kabeer khan <kabeer.k...@samsung.com> Reviewers: tasn Subscribers: devilhorns, cedric Differential Revision: https://phab.enlightenment.org/D1692 --- src/lib/evas/canvas/evas_object_textblock.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 2534f20..9ae9f09 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -5607,7 +5607,7 @@ _relayout_if_needed(Evas_Object *eo_obj, const Evas_Textblock_Data *o) * @see _find_layout_format_item_line_match() */ static void -_find_layout_item_line_match(Evas_Object *eo_obj, Evas_Object_Textblock_Node_Text *n, int pos, Evas_Object_Textblock_Line **lnr, Evas_Object_Textblock_Item **itr) +_find_layout_item_line_match(Evas_Object *eo_obj, Evas_Object_Textblock_Node_Text *n, size_t pos, Evas_Object_Textblock_Line **lnr, Evas_Object_Textblock_Item **itr) { Evas_Object_Textblock_Paragraph *found_par; Evas_Object_Textblock_Line *ln; @@ -5625,22 +5625,21 @@ _find_layout_item_line_match(Evas_Object *eo_obj, Evas_Object_Textblock_Node_Tex EINA_INLIST_FOREACH(ln->items, it) { - /* FIXME: p should be size_t, same goes for pos */ - int p = (int) it->text_pos; + size_t p = it->text_pos; if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) { Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it); - p += (int) ti->text_props.text_len; + p += ti->text_props.text_len; } else { p++; } - if (((pos >= (int) it->text_pos) && (pos < p))) + if (((pos >= it->text_pos) && (pos < p))) { *lnr = ln; *itr = it; --