summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2018-06-19 15:33:12 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-19 15:33:12 +0000
commita700b851c31a67ce4034731e8c06808498a9903b (patch)
tree77b0ca0f06c730c8c3013dd3905b4d0e7fdef44a /core/fpdfapi/parser
parenta1ea4276f87f945dfe922f7c37c08f2d203e4e59 (diff)
downloadpdfium-a700b851c31a67ce4034731e8c06808498a9903b.tar.xz
Use const pointers within GetDirectInteger function.
Change-Id: I4a2905f9ce4433e8c00b274fa9703ff4dc459e95 Reviewed-on: https://pdfium-review.googlesource.com/35510 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/fpdf_parser_utility.cpp4
-rw-r--r--core/fpdfapi/parser/fpdf_parser_utility.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/parser/fpdf_parser_utility.cpp b/core/fpdfapi/parser/fpdf_parser_utility.cpp
index 1dad2a8ab3..3c99415d21 100644
--- a/core/fpdfapi/parser/fpdf_parser_utility.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_utility.cpp
@@ -84,8 +84,8 @@ int32_t GetHeaderOffset(const RetainPtr<IFX_SeekableReadStream>& pFile) {
return kInvalidHeaderOffset;
}
-int32_t GetDirectInteger(CPDF_Dictionary* pDict, const ByteString& key) {
- CPDF_Number* pObj = ToNumber(pDict->GetObjectFor(key));
+int32_t GetDirectInteger(const CPDF_Dictionary* pDict, const ByteString& key) {
+ const CPDF_Number* pObj = ToNumber(pDict->GetObjectFor(key));
return pObj ? pObj->GetInteger() : 0;
}
diff --git a/core/fpdfapi/parser/fpdf_parser_utility.h b/core/fpdfapi/parser/fpdf_parser_utility.h
index 3ae8f6f13f..7529fbc484 100644
--- a/core/fpdfapi/parser/fpdf_parser_utility.h
+++ b/core/fpdfapi/parser/fpdf_parser_utility.h
@@ -43,7 +43,7 @@ constexpr int32_t kInvalidHeaderOffset = -1;
// |kInvalidHeaderOffset|.
int32_t GetHeaderOffset(const RetainPtr<IFX_SeekableReadStream>& pFile);
-int32_t GetDirectInteger(CPDF_Dictionary* pDict, const ByteString& key);
+int32_t GetDirectInteger(const CPDF_Dictionary* pDict, const ByteString& key);
ByteString PDF_NameDecode(const ByteStringView& orig);
ByteString PDF_NameEncode(const ByteString& orig);