mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-18 17:29:28 +03:00
Removed explicit loop unrolling in xx_strchr as that is the job of the compiler.
This commit is contained in:
parent
2399a1604f
commit
29010bfdd1
@ -255,19 +255,12 @@ compare_word_to_right (WEdit *edit, long i, const char *text,
|
||||
return i;
|
||||
}
|
||||
|
||||
#define XXX \
|
||||
if (*s < '\005' || *s == (unsigned char) c) \
|
||||
goto done; \
|
||||
s++;
|
||||
|
||||
static inline char *xx_strchr (const unsigned char *s, int c)
|
||||
static inline const char *xx_strchr (const unsigned char *s, int c)
|
||||
{
|
||||
repeat:
|
||||
XXX XXX XXX XXX XXX XXX XXX XXX;
|
||||
XXX XXX XXX XXX XXX XXX XXX XXX;
|
||||
goto repeat;
|
||||
done:
|
||||
return (char *) s;
|
||||
while (*s >= '\005' && *s != (unsigned char) c) {
|
||||
s++;
|
||||
}
|
||||
return (const char *) s;
|
||||
}
|
||||
|
||||
static inline struct syntax_rule apply_rules_going_right (WEdit * edit, long i, struct syntax_rule rule)
|
||||
|
Loading…
Reference in New Issue
Block a user