Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2798)

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_hint_tables.h

Issue 2294383003: Use unsigned page indexes in CPDF_HintTables. (Closed)
Patch Set: more safe math Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/cpdf_hint_tables.h
diff --git a/core/fpdfapi/fpdf_parser/cpdf_hint_tables.h b/core/fpdfapi/fpdf_parser/cpdf_hint_tables.h
index cda0925de81cdb2cdb9476716df1f3bc3339c299..1943c79f4488152850a2da568950e0503b7ea1db 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_hint_tables.h
+++ b/core/fpdfapi/fpdf_parser/cpdf_hint_tables.h
@@ -22,13 +22,13 @@ class CPDF_HintTables {
CPDF_HintTables(CPDF_DataAvail* pDataAvail, CPDF_Dictionary* pLinearized);
virtual ~CPDF_HintTables();
- bool GetPagePos(int index,
+ bool GetPagePos(uint32_t index,
FX_FILESIZE* szPageStartPos,
FX_FILESIZE* szPageLength,
uint32_t* dwObjNum);
CPDF_DataAvail::DocAvailStatus CheckPage(
- int index,
+ uint32_t index,
CPDF_DataAvail::DownloadHints* pHints);
bool LoadHintStream(CPDF_Stream* pHintStream);
@@ -36,7 +36,6 @@ class CPDF_HintTables {
protected:
bool ReadPageHintTable(CFX_BitStream* hStream);
bool ReadSharedObjHintTable(CFX_BitStream* hStream, uint32_t offset);
- uint32_t GetItemLength(int index, const std::vector<FX_FILESIZE>& szArray);
private:
// Tests can override.
@@ -50,6 +49,9 @@ class CPDF_HintTables {
// Helper for the ReadPrimaryHintStream methods above.
int ReadPrimaryHintStream(int index) const;
+ uint32_t GetItemLength(uint32_t index,
+ const std::vector<FX_FILESIZE>& szArray);
+
// Owner, outlives this object.
CPDF_DataAvail* const m_pDataAvail;
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698