2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-05-29 00:10:54 +00:00

Replace strchr in QPDFTokenizer::is_delimiter

This commit is contained in:
m-holger 2023-01-30 14:45:04 +00:00 committed by Jay Berkenbilt
parent 9096df74fc
commit 3ee552fec5

View File

@ -14,10 +14,14 @@
#include <stdlib.h>
#include <string.h>
static bool
static inline bool
is_delimiter(char ch)
{
return (strchr(" \t\n\v\f\r()<>[]{}/%", ch) != nullptr);
return (
ch == ' ' || ch == '\n' || ch == '/' || ch == '(' || ch == ')' ||
ch == '{' || ch == '}' || ch == '<' || ch == '>' || ch == '[' ||
ch == ']' || ch == '%' || ch == '\t' || ch == '\r' || ch == '\v' ||
ch == '\f' || ch == 0);
}
namespace