mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-31 02:48:31 +00:00
Switch some code to use empty newArray/newDictionary
This commit is contained in:
parent
b6bdc0f595
commit
6c0af0844c
@ -190,8 +190,7 @@ int main(int argc, char* argv[])
|
||||
else
|
||||
{
|
||||
QTC::TC("examples", "pdf-mod-info file no info");
|
||||
std::map<std::string, QPDFObjectHandle> vacant;
|
||||
fileinfo = fileinfo.newDictionary(vacant);
|
||||
fileinfo = QPDFObjectHandle::newDictionary();
|
||||
filetrailer.replaceKey("/Info", fileinfo);
|
||||
}
|
||||
}
|
||||
|
@ -655,8 +655,7 @@ QPDFObjectHandle
|
||||
QPDFObjectHandle::newStream(QPDF* qpdf)
|
||||
{
|
||||
QTC::TC("qpdf", "QPDFObjectHandle newStream");
|
||||
std::map<std::string, QPDFObjectHandle> keys;
|
||||
QPDFObjectHandle stream_dict = newDictionary(keys);
|
||||
QPDFObjectHandle stream_dict = newDictionary();
|
||||
QPDFObjectHandle result = qpdf->makeIndirectObject(
|
||||
QPDFObjectHandle(
|
||||
new QPDF_Stream(qpdf, 0, 0, stream_dict, 0, 0)));
|
||||
|
@ -340,9 +340,7 @@ void qpdf_set_info_key(qpdf_data qpdf, char const* key, char const* value)
|
||||
QTC::TC("qpdf", "qpdf-c add info to trailer");
|
||||
trailer.replaceKey(
|
||||
"/Info",
|
||||
qpdf->qpdf->makeIndirectObject(
|
||||
QPDFObjectHandle::newDictionary(
|
||||
std::map<std::string, QPDFObjectHandle>())));
|
||||
qpdf->qpdf->makeIndirectObject(QPDFObjectHandle::newDictionary()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -597,9 +597,8 @@ void runtest(int n, char const* filename)
|
||||
QPDFObjectHandle qarray = trailer.getKey("/QArray");
|
||||
// Force qdict but not qarray to resolve
|
||||
qdict.isDictionary();
|
||||
std::map<std::string, QPDFObjectHandle> dict_keys;
|
||||
dict_keys["/NewDict"] = QPDFObjectHandle::newInteger(2);
|
||||
QPDFObjectHandle new_dict = QPDFObjectHandle::newDictionary(dict_keys);
|
||||
QPDFObjectHandle new_dict = QPDFObjectHandle::newDictionary();
|
||||
new_dict.replaceKey("/NewDict", QPDFObjectHandle::newInteger(2));
|
||||
try
|
||||
{
|
||||
// Do it wrong first...
|
||||
|
Loading…
x
Reference in New Issue
Block a user