aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFFileSpecObjectHelper.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-01-26 09:00:23 +0100
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-01-27 14:31:12 +0100
commit07db3200cb0ef058b8a66ece8d9757adfba49fd1 (patch)
tree084c94a5778581451bb42e5cd38fffeb36a12e2b /libqpdf/QPDFFileSpecObjectHelper.cc
parent710d2e54f0762b7702640766d33b7e0977ba69de (diff)
downloadqpdf-07db3200cb0ef058b8a66ece8d9757adfba49fd1.tar.zst
Remove some if statements and simplify some boolean expressions
Use QPDFObjectHandle::isNameAndEquals, isDictionaryOfType and isStreamOfType.
Diffstat (limited to 'libqpdf/QPDFFileSpecObjectHelper.cc')
-rw-r--r--libqpdf/QPDFFileSpecObjectHelper.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/libqpdf/QPDFFileSpecObjectHelper.cc b/libqpdf/QPDFFileSpecObjectHelper.cc
index ad422d2b..b3df5e22 100644
--- a/libqpdf/QPDFFileSpecObjectHelper.cc
+++ b/libqpdf/QPDFFileSpecObjectHelper.cc
@@ -15,8 +15,7 @@ QPDFFileSpecObjectHelper::QPDFFileSpecObjectHelper(
oh.warnIfPossible("Embedded file object is not a dictionary");
return;
}
- auto type = oh.getKey("/Type");
- if (! (type.isName() && (type.getName() == "/Filespec")))
+ if (! oh.isDictionaryOfType("/Filespec"))
{
oh.warnIfPossible("Embedded file object's type is not /Filespec");
}