diff options
author | m-holger <m-holger@kubitscheck.org> | 2023-01-30 15:45:04 +0100 |
---|---|---|
committer | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2023-02-05 14:29:21 +0100 |
commit | 3ee552fec5c4e5e478ce4f6fbe60cf65218f8e84 (patch) | |
tree | 3ec3033ba79dd6896a623ef76bef417553cc9982 /libqpdf/QPDFTokenizer.cc | |
parent | 9096df74fc89614125c00c2eb358c350eea96cdb (diff) | |
download | qpdf-3ee552fec5c4e5e478ce4f6fbe60cf65218f8e84.tar.zst |
Replace strchr in QPDFTokenizer::is_delimiter
Diffstat (limited to 'libqpdf/QPDFTokenizer.cc')
-rw-r--r-- | libqpdf/QPDFTokenizer.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libqpdf/QPDFTokenizer.cc b/libqpdf/QPDFTokenizer.cc index fe36d768..990d5b65 100644 --- a/libqpdf/QPDFTokenizer.cc +++ b/libqpdf/QPDFTokenizer.cc @@ -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 |