summaryrefslogtreecommitdiff
path: root/poppler/FDPDFDocBuilder.cc
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2022-02-15 18:43:16 +0100
committerAlbert Astals Cid <tsdgeos@yahoo.es>2022-02-16 10:43:15 +0000
commit4f2abd3efa1ee013d7e672bad5a2fe58610cdc1d (patch)
treef5b7710467243a8bb16e2008ee2622caf25860c7 /poppler/FDPDFDocBuilder.cc
parent608c6eaf32252f3798ff0a91d3be5d52fdcdacc0 (diff)
PDFDoc: Make passwords std::optional instead of pointers
Makes it clearer that we're not taking ownership of them
Diffstat (limited to 'poppler/FDPDFDocBuilder.cc')
-rw-r--r--poppler/FDPDFDocBuilder.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/poppler/FDPDFDocBuilder.cc b/poppler/FDPDFDocBuilder.cc
index a35e41af..dab95510 100644
--- a/poppler/FDPDFDocBuilder.cc
+++ b/poppler/FDPDFDocBuilder.cc
@@ -5,7 +5,7 @@
// This file is licensed under the GPLv2 or later
//
// Copyright 2010 Hib Eris <hib@hiberis.nl>
-// Copyright 2010, 2017, 2021 Albert Astals Cid <aacid@kde.org>
+// Copyright 2010, 2017, 2021, 2022 Albert Astals Cid <aacid@kde.org>
// Copyright 2021 Oliver Sander <oliver.sander@tu-dresden.de>
// Copyright 2021 Christian Persch <chpe@src.gnome.org>
//
@@ -33,7 +33,7 @@ int FileDescriptorPDFDocBuilder::parseFdFromUri(const GooString &uri)
return fd;
}
-std::unique_ptr<PDFDoc> FileDescriptorPDFDocBuilder::buildPDFDoc(const GooString &uri, GooString *ownerPassword, GooString *userPassword, void *guiDataA)
+std::unique_ptr<PDFDoc> FileDescriptorPDFDocBuilder::buildPDFDoc(const GooString &uri, const std::optional<GooString> &ownerPassword, const std::optional<GooString> &userPassword, void *guiDataA)
{
const auto fd = parseFdFromUri(uri);
if (fd == -1)