From 8cbc44fcde33d5851998b618bf58bcd986dc885d Mon Sep 17 00:00:00 2001 From: tasn Date: Mon, 30 May 2011 08:16:32 +0000 Subject: [PATCH] Evas textblock: Removed ununeeded allocation. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@59801 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_textblock.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 2025379..03b0428 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -2749,7 +2749,6 @@ static void _layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Textblock_Node_Text *n, int start, int off, const char *repch) { int new_line, empty_item; - Eina_Unicode *alloc_str = NULL; const Eina_Unicode *str = EINA_UNICODE_EMPTY_STRING; const Eina_Unicode *tbase; Evas_Object_Textblock_Text_Item *ti; @@ -2802,9 +2801,7 @@ _layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Text /* Use the string, just cut the relevant parts */ else { - str = eina_ustrbuf_string_get(n->unicode); - alloc_str = eina_unicode_strndup(str + start, off); - str = alloc_str; + str = eina_ustrbuf_string_get(n->unicode) + start; } cur_len = off; @@ -2824,7 +2821,7 @@ skip: ti->parent.text_pos = 0; _layout_text_add_logical_item(c, ti, NULL); - goto end; + return; } do @@ -2887,8 +2884,6 @@ skip: } while (*str); -end: - if (alloc_str) free(alloc_str); } /** -- 2.7.4