inpcom.c, rewrite
This commit is contained in:
parent
339a002c55
commit
ebc50b8639
|
|
@ -1657,13 +1657,6 @@ inp_fix_ternary_operator_str(char *line, bool all)
|
||||||
str_ptr = skip_ws(str_ptr + 1);
|
str_ptr = skip_ws(str_ptr + 1);
|
||||||
if (*str_ptr == '{')
|
if (*str_ptr == '{')
|
||||||
str_ptr = skip_ws(str_ptr + 1);
|
str_ptr = skip_ws(str_ptr + 1);
|
||||||
|
|
||||||
question = strchr(str_ptr, '?');
|
|
||||||
paren_ptr = strchr(str_ptr, '(');
|
|
||||||
|
|
||||||
if (paren_ptr && paren_ptr < question)
|
|
||||||
paren_ptr = NULL;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
|
@ -1733,7 +1726,8 @@ inp_fix_ternary_operator_str(char *line, bool all)
|
||||||
|
|
||||||
// get else
|
// get else
|
||||||
str_ptr = skip_ws(colon + 1);
|
str_ptr = skip_ws(colon + 1);
|
||||||
if (paren_ptr != NULL) {
|
paren_ptr = strchr(question, '(');
|
||||||
|
if (paren_ptr) {
|
||||||
// find end paren ')'
|
// find end paren ')'
|
||||||
bool found_paren = FALSE;
|
bool found_paren = FALSE;
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue