diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-06-26 18:42:28 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-26 18:42:28 +0000 |
commit | 0a6dbeffbc61f2140b1b845f6791c1b15b34cbd7 (patch) | |
tree | 7f17e935721f2e9752d2b80fe4cdcbb4f8eb79ba /core/fpdfapi/parser | |
parent | 785da23f6cce8004b8e7759345abd877dab953ea (diff) | |
download | pdfium-0a6dbeffbc61f2140b1b845f6791c1b15b34cbd7.tar.xz |
Add some more consts to unowned pointers.
Ideally, unowned ptrs might well be const, as updating something
through an unowned reference is best avoided.
Change-Id: Ida8111ffe0ee1e30bbf6b7718b0929dfb5cafdff
Reviewed-on: https://pdfium-review.googlesource.com/36050
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r-- | core/fpdfapi/parser/cpdf_parser.cpp | 4 | ||||
-rw-r--r-- | core/fpdfapi/parser/cpdf_parser.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp index 854d6e7f60..3a7afd0b49 100644 --- a/core/fpdfapi/parser/cpdf_parser.cpp +++ b/core/fpdfapi/parser/cpdf_parser.cpp @@ -1135,11 +1135,11 @@ std::unique_ptr<CPDF_Dictionary> CPDF_Parser::GetCombinedTrailer() const { return m_TrailerData->GetCombinedTrailer(); } -uint32_t CPDF_Parser::GetInfoObjNum() { +uint32_t CPDF_Parser::GetInfoObjNum() const { return m_TrailerData->GetInfoObjNum(); } -uint32_t CPDF_Parser::GetRootObjNum() { +uint32_t CPDF_Parser::GetRootObjNum() const { return m_TrailerData->GetRootObjNum(); } diff --git a/core/fpdfapi/parser/cpdf_parser.h b/core/fpdfapi/parser/cpdf_parser.h index b74f1d52ab..3151da61c9 100644 --- a/core/fpdfapi/parser/cpdf_parser.h +++ b/core/fpdfapi/parser/cpdf_parser.h @@ -57,7 +57,7 @@ class CPDF_Parser { CPDF_Document* pDocument); void SetPassword(const char* password) { m_Password = password; } - ByteString GetPassword() { return m_Password; } + ByteString GetPassword() const { return m_Password; } CPDF_Dictionary* GetTrailer() const; @@ -68,8 +68,8 @@ class CPDF_Parser { FX_FILESIZE GetLastXRefOffset() const { return m_LastXRefOffset; } uint32_t GetPermissions() const; - uint32_t GetRootObjNum(); - uint32_t GetInfoObjNum(); + uint32_t GetRootObjNum() const; + uint32_t GetInfoObjNum() const; const CPDF_Array* GetIDArray() const; CPDF_Dictionary* GetEncryptDict() const { return m_pEncryptDict.Get(); } |