summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/pdf-filter-tokens.cc3
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()))) {