Ticket #2243: code cleanup before 4.7.3 release.
Removed unneeded breaks from switch operators. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
родитель
a6bc7200ca
Коммит
ec7b039588
@ -103,7 +103,6 @@ mc_search__glob_translate_to_regex (gchar * str, gsize * len)
|
||||
g_string_append_c (buff, str[loop]);
|
||||
loop++;
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
g_string_append_c (buff, str[loop]);
|
||||
loop++;
|
||||
|
@ -74,7 +74,6 @@ mc_search__normal_translate_to_regex (gchar * str, gsize * len)
|
||||
g_string_append_c (buff, str[loop]);
|
||||
loop++;
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
g_string_append_c (buff, str[loop]);
|
||||
loop++;
|
||||
|
@ -631,14 +631,12 @@ mc_search__run_regex (mc_search_t * lc_mc_search, const void *user_data,
|
||||
*found_len = end_pos - start_pos;
|
||||
lc_mc_search->normal_offset = lc_mc_search->start_buffer + start_pos;
|
||||
return TRUE;
|
||||
break;
|
||||
case COND__NOT_ALL_FOUND:
|
||||
break;
|
||||
default:
|
||||
g_string_free (lc_mc_search->regex_buffer, TRUE);
|
||||
lc_mc_search->regex_buffer = NULL;
|
||||
return FALSE;
|
||||
break;
|
||||
}
|
||||
if ((lc_mc_search->update_fn != NULL) &&
|
||||
((lc_mc_search->update_fn) (user_data, current_pos) == MC_SEARCH_CB_ABORT))
|
||||
|
@ -282,7 +282,6 @@ mc_search_is_type_avail (mc_search_type_t search_type)
|
||||
case MC_SEARCH_T_REGEX:
|
||||
case MC_SEARCH_T_HEX:
|
||||
return TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -359,10 +358,8 @@ mc_search_is_fixed_search_str (mc_search_t * lc_mc_search)
|
||||
case MC_SEARCH_T_REGEX:
|
||||
case MC_SEARCH_T_GLOB:
|
||||
return FALSE;
|
||||
break;
|
||||
default:
|
||||
return TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,25 +64,20 @@ strutils_escape (const char *src, gsize src_len, const char *escaped_chars,
|
||||
src_len = strlen (src);
|
||||
|
||||
for (curr_index = 0; curr_index < src_len; curr_index++) {
|
||||
|
||||
if (escape_non_printable) {
|
||||
switch (src[curr_index]) {
|
||||
case '\n':
|
||||
g_string_append (ret, "\\n");
|
||||
continue;
|
||||
break;
|
||||
case '\t':
|
||||
g_string_append (ret, "\\t");
|
||||
continue;
|
||||
break;
|
||||
case '\b':
|
||||
g_string_append (ret, "\\b");
|
||||
continue;
|
||||
break;
|
||||
case '\0':
|
||||
g_string_append (ret, "\\0");
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,19 +119,15 @@ strutils_unescape (const char *src, gsize src_len, const char *unescaped_chars,
|
||||
case 'n':
|
||||
g_string_append_c (ret, '\n');
|
||||
continue;
|
||||
break;
|
||||
case 't':
|
||||
g_string_append_c (ret, '\t');
|
||||
continue;
|
||||
break;
|
||||
case 'b':
|
||||
g_string_append_c (ret, '\b');
|
||||
continue;
|
||||
break;
|
||||
case '0':
|
||||
g_string_append (ret, '\0');
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (strchr (unescaped_chars, (int) src[curr_index]) == NULL)
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user