mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-13 14:59:18 +03:00
use g_string_sized_new() instread of g_string_new() to avoid often reallocation action
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
3aa6758f4f
commit
3facc59837
@ -123,7 +123,7 @@ mc_search__glob_translate_to_regex (gchar * str, gsize * len)
|
|||||||
static GString *
|
static GString *
|
||||||
mc_search__translate_replace_glob_to_regex (gchar * str)
|
mc_search__translate_replace_glob_to_regex (gchar * str)
|
||||||
{
|
{
|
||||||
GString *buff = g_string_new ("");
|
GString *buff = g_string_sized_new (32);
|
||||||
int cnt = '0';
|
int cnt = '0';
|
||||||
gboolean escaped_mode = FALSE;
|
gboolean escaped_mode = FALSE;
|
||||||
while (*str)
|
while (*str)
|
||||||
|
Loading…
Reference in New Issue
Block a user