textblock: Simple refactoring for _markup_get_text_utf8_append to call eina_unicode_utf8_next_get directly

Summary:
evas_string_char_next_get is simple wrapper of eina_unicode_utf8_next_get with
some check routines.
But in _markup_get_text_utf8_append, these check routines look unnecessary.

Reviewers: cedric, seoz, raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D420
This commit is contained in:
Ryuan Choi 2013-12-29 13:33:19 +09:00 committed by Carsten Haitzler (Rasterman)
parent 011fb2d10a
commit b25df71d57
1 changed files with 3 additions and 1 deletions

View File

@ -6335,7 +6335,7 @@ _markup_get_text_utf8_append(Eina_Strbuf *sbuf, const char *text)
for (;;)
{
pos = pos2;
pos2 = evas_string_char_next_get(text, pos2, &ch);
ch = eina_unicode_utf8_next_get(text, &pos2);
if ((ch <= 0) || (pos2 <= 0)) break;
if (ch == _NEWLINE)
@ -6371,6 +6371,8 @@ _markup_get_text_append(Eina_Strbuf *txt, const Eina_Unicode *text)
{
char *base = eina_unicode_unicode_to_utf8(text, NULL);
if (!base) return;
_markup_get_text_utf8_append(txt, base);
free(base);