mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +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 *
|
||||
mc_search__translate_replace_glob_to_regex (gchar * str)
|
||||
{
|
||||
GString *buff = g_string_new ("");
|
||||
GString *buff = g_string_sized_new (32);
|
||||
int cnt = '0';
|
||||
gboolean escaped_mode = FALSE;
|
||||
while (*str)
|
||||
|
Loading…
Reference in New Issue
Block a user