Avoid extra-allocation of string while prepare to regexp-search.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Этот коммит содержится в:
родитель
8d59d66188
Коммит
601047b6a1
@ -532,8 +532,7 @@ mc_search__cond_struct_new_init_regex (const char *charset, mc_search_t * lc_mc_
|
||||
|
||||
if (!lc_mc_search->is_case_sensitive)
|
||||
{
|
||||
tmp = g_string_new_len (mc_search_cond->str->str, mc_search_cond->str->len);
|
||||
g_string_free (mc_search_cond->str, TRUE);
|
||||
tmp = mc_search_cond->str;
|
||||
mc_search_cond->str = mc_search__cond_struct_new_regex_ci_str (charset, tmp->str, tmp->len);
|
||||
g_string_free (tmp, TRUE);
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user