summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_parser/parser_int.h2
-rw-r--r--samples/pdfium_test.cc20
3 files changed, 11 insertions, 13 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index 93212e77c1..f5ada7c6eb 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -4690,7 +4690,7 @@ FX_BOOL CPDF_HintTables::ReadPageHintTable(CFX_BitStream* hStream) {
// where in the page's content stream the object is first referenced.
FX_DWORD dwSharedNumeratorBits = hStream->GetBits(16);
// Item 13: Skip Item 13 which has 16 bits.
- FX_DWORD dwSharedDenominator = hStream->GetBits(16);
+ hStream->SkipBits(16);
CPDF_Object* pPageNum = m_pLinearizedDict->GetElementValue(FX_BSTRC("N"));
int nPages = pPageNum ? pPageNum->GetInteger() : 0;
if (nPages < 1)
diff --git a/core/src/fpdfapi/fpdf_parser/parser_int.h b/core/src/fpdfapi/fpdf_parser/parser_int.h
index a9d5874f75..5e4dffa8b7 100644
--- a/core/src/fpdfapi/fpdf_parser/parser_int.h
+++ b/core/src/fpdfapi/fpdf_parser/parser_int.h
@@ -13,7 +13,6 @@ class CPDF_HintTables {
public:
CPDF_HintTables(CPDF_DataAvail* pDataAvail, CPDF_Dictionary* pLinearized)
: m_pLinearizedDict(pLinearized),
- m_pHintStream(nullptr),
m_pDataAvail(pDataAvail),
m_nFirstPageSharedObjs(0),
m_szFirstPageObjOffset(0) {}
@@ -35,7 +34,6 @@ class CPDF_HintTables {
int ReadPrimaryHintStreamLength() const;
CPDF_Dictionary* m_pLinearizedDict;
- CPDF_Stream* m_pHintStream;
CPDF_DataAvail* m_pDataAvail;
FX_DWORD m_nFirstPageSharedObjs;
FX_FILESIZE m_szFirstPageObjOffset;
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index fc94fde19f..571bfcd3e6 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -344,14 +344,14 @@ FPDF_BOOL Is_Data_Avail(FX_FILEAVAIL* pThis, size_t offset, size_t size) {
void Add_Segment(FX_DOWNLOADHINTS* pThis, size_t offset, size_t size) {
}
-FPDF_BOOL RenderPage(const std::string& name,
- const FPDF_DOCUMENT& doc,
- const FPDF_FORMHANDLE& form,
- const int page_index,
- const Options& options) {
+bool RenderPage(const std::string& name,
+ const FPDF_DOCUMENT& doc,
+ const FPDF_FORMHANDLE& form,
+ const int page_index,
+ const Options& options) {
FPDF_PAGE page = FPDF_LoadPage(doc, page_index);
if (!page) {
- return FALSE;
+ return false;
}
FPDF_TEXTPAGE text_page = FPDFText_LoadPage(page);
FORM_OnAfterLoadPage(page, form);
@@ -367,7 +367,7 @@ FPDF_BOOL RenderPage(const std::string& name,
FPDF_BITMAP bitmap = FPDFBitmap_Create(width, height, 0);
if (!bitmap) {
fprintf(stderr, "Page was too large to be rendered.\n");
- return FALSE;
+ return false;
}
FPDFBitmap_FillRect(bitmap, 0, 0, width, height, 0xFFFFFFFF);
@@ -405,7 +405,7 @@ FPDF_BOOL RenderPage(const std::string& name,
FORM_OnBeforeClosePage(page, form);
FPDFText_ClosePage(text_page);
FPDF_ClosePage(page);
- return TRUE;
+ return true;
}
void RenderPdf(const std::string& name, const char* pBuf, size_t len,
@@ -442,7 +442,7 @@ void RenderPdf(const std::string& name, const char* pBuf, size_t len,
FPDF_DOCUMENT doc;
int nRet = PDF_DATA_NOTAVAIL;
- FPDF_BOOL bIsLinearized = FALSE;
+ bool bIsLinearized = false;
FPDF_AVAIL pdf_avail = FPDFAvail_Create(&file_avail, &file_access);
if (FPDFAvail_IsLinearized(pdf_avail) == PDF_LINEARIZED) {
@@ -463,7 +463,7 @@ void RenderPdf(const std::string& name, const char* pBuf, size_t len,
nRet);
return;
}
- bIsLinearized = TRUE;
+ bIsLinearized = true;
}
} else {
fprintf(stderr, "Non-linearized path...\n");