forked from enlightenment/efl
evas/language: #ifdef guard variable which is only used inside #ifdef
Summary: this variable is already only changed inside an #ifdef, so declare and free it only inside the same ifdef for clarity CIDs 1401016, 1400807 Reviewers: cedric Reviewed By: cedric Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10320
This commit is contained in:
parent
dd093de23c
commit
9d9aa8b6ae
|
@ -233,7 +233,9 @@ evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len,
|
||||||
EvasBiDiCharType *char_types = NULL;
|
EvasBiDiCharType *char_types = NULL;
|
||||||
EvasBiDiLevel *embedding_levels = NULL;
|
EvasBiDiLevel *embedding_levels = NULL;
|
||||||
const FriBidiChar *ustr;
|
const FriBidiChar *ustr;
|
||||||
|
#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
|
||||||
FriBidiChar *base_ustr = NULL;
|
FriBidiChar *base_ustr = NULL;
|
||||||
|
#endif
|
||||||
EvasBiDiLevel ret_level = 0;
|
EvasBiDiLevel ret_level = 0;
|
||||||
#if FRIBIDI_MAJOR_VERSION >= 1
|
#if FRIBIDI_MAJOR_VERSION >= 1
|
||||||
EvasBiDiBracketType *bracket_types = NULL;
|
EvasBiDiBracketType *bracket_types = NULL;
|
||||||
|
@ -392,8 +394,9 @@ evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len,
|
||||||
free(bidi_props->char_types);
|
free(bidi_props->char_types);
|
||||||
}
|
}
|
||||||
bidi_props->char_types = char_types;
|
bidi_props->char_types = char_types;
|
||||||
|
#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
|
||||||
if (base_ustr) free(base_ustr);
|
if (base_ustr) free(base_ustr);
|
||||||
|
#endif
|
||||||
#if FRIBIDI_MAJOR_VERSION >= 1
|
#if FRIBIDI_MAJOR_VERSION >= 1
|
||||||
/* Currently, bracket_types is not reused in other places. */
|
/* Currently, bracket_types is not reused in other places. */
|
||||||
if (bracket_types) free(bracket_types);
|
if (bracket_types) free(bracket_types);
|
||||||
|
@ -408,7 +411,9 @@ cleanup:
|
||||||
if (bracket_types) free(bracket_types);
|
if (bracket_types) free(bracket_types);
|
||||||
#endif
|
#endif
|
||||||
if (embedding_levels) free(embedding_levels);
|
if (embedding_levels) free(embedding_levels);
|
||||||
|
#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
|
||||||
if (base_ustr) free(base_ustr);
|
if (base_ustr) free(base_ustr);
|
||||||
|
#endif
|
||||||
if (bidi_props) evas_bidi_paragraph_props_unref(bidi_props); /* Clean up the bidi props */
|
if (bidi_props) evas_bidi_paragraph_props_unref(bidi_props); /* Clean up the bidi props */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue