Fix last two shadow warnings in PSOutputDev
Don't pass doc to writeDocSetup, we already have it
Rename writeDocSetup pages to pageList
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 5de181d..0fdc92c 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -1443,7 +1443,7 @@
writePS("%%EndProlog\n");
writePS("%%BeginSetup\n");
}
- writeDocSetup(doc, catalog, pageList, duplex);
+ writeDocSetup(catalog, pageList, duplex);
if (mode != psModeForm) {
writePS("%%EndSetup\n");
}
@@ -1658,8 +1658,8 @@
}
}
-void PSOutputDev::writeDocSetup(PDFDoc *doc, Catalog *catalog,
- const std::vector<int> &pages,
+void PSOutputDev::writeDocSetup(Catalog *catalog,
+ const std::vector<int> &pageList,
bool duplexA) {
Page *page;
Dict *resDict;
@@ -1673,8 +1673,8 @@
} else {
writePS("xpdf begin\n");
}
- for (size_t pgi = 0; pgi < pages.size(); ++pgi) {
- const int pg = pages[pgi];
+ for (size_t pgi = 0; pgi < pageList.size(); ++pgi) {
+ const int pg = pageList[pgi];
page = doc->getPage(pg);
if (!page) {
error(errSyntaxError, -1, "Failed writing resources for page {0:d}", pg);
diff --git a/poppler/PSOutputDev.h b/poppler/PSOutputDev.h
index e794938..51f1401 100644
--- a/poppler/PSOutputDev.h
+++ b/poppler/PSOutputDev.h
@@ -429,7 +429,7 @@
GooString *filterPSName(const GooString *name);
// Write the document-level setup.
- void writeDocSetup(PDFDoc *doc, Catalog *catalog, const std::vector<int> &pages, bool duplexA);
+ void writeDocSetup(Catalog *catalog, const std::vector<int> &pageList, bool duplexA);
void writePSChar(char c);
void writePS(const char *s);