diff options
author | m-holger <m-holger@kubitscheck.org> | 2022-09-29 15:33:11 +0200 |
---|---|---|
committer | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2022-11-20 17:55:02 +0100 |
commit | 34a6f8938f0e6d55eeb9f37c0ef23e02fec88932 (patch) | |
tree | 0815d2e295f7a8e44d9e76ae8238db5c151bb683 /examples | |
parent | dca70f13e77a5b20ba4f438350a67e48baa796d0 (diff) | |
download | qpdf-34a6f8938f0e6d55eeb9f37c0ef23e02fec88932.tar.zst |
Add methods QPDFTokenizer::Token::isWord
Diffstat (limited to 'examples')
-rw-r--r-- | examples/pdf-filter-tokens.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/pdf-filter-tokens.cc b/examples/pdf-filter-tokens.cc index c9a71e64..a99ce70c 100644 --- a/examples/pdf-filter-tokens.cc +++ b/examples/pdf-filter-tokens.cc @@ -139,8 +139,7 @@ ColorToGray::handleToken(QPDFTokenizer::Token const& token) QPDFTokenizer::token_type_e token_type = token.getType(); if (!isIgnorable(token_type)) { this->stack.push_back(token); - if ((this->stack.size() == 4) && - (token == QPDFTokenizer::Token(QPDFTokenizer::tt_word, "rg")) && + if ((this->stack.size() == 4) && token.isWord("rg") && (isNumeric(this->stack.at(0).getType())) && (isNumeric(this->stack.at(1).getType())) && (isNumeric(this->stack.at(2).getType()))) { |