summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_array.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-09 23:15:12 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-09 23:15:12 +0000
commit3774c7a452886b9c8beeb5fa1b54a34611551180 (patch)
treeaba96eeb7d9fc266ecbe7bc460dcaac869514ecf /core/fpdfapi/parser/cpdf_array.h
parent7e28208d26764438bef62e051d2e1fed13e1e0ec (diff)
downloadpdfium-3774c7a452886b9c8beeb5fa1b54a34611551180.tar.xz
Add proper const/non-const versions of CPDF_Array methods.
Instead of having const methods that return non-const pointers. BUG=pdfium:234 Change-Id: I61495543f67229500dfcf2248e93468e9a9b23cf Reviewed-on: https://pdfium-review.googlesource.com/32183 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_array.h')
-rw-r--r--core/fpdfapi/parser/cpdf_array.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/core/fpdfapi/parser/cpdf_array.h b/core/fpdfapi/parser/cpdf_array.h
index 442b85cc80..d980b14507 100644
--- a/core/fpdfapi/parser/cpdf_array.h
+++ b/core/fpdfapi/parser/cpdf_array.h
@@ -37,15 +37,20 @@ class CPDF_Array : public CPDF_Object {
bool IsEmpty() const { return m_Objects.empty(); }
size_t GetCount() const { return m_Objects.size(); }
- CPDF_Object* GetObjectAt(size_t index) const;
- CPDF_Object* GetDirectObjectAt(size_t index) const;
+ CPDF_Object* GetObjectAt(size_t index);
+ const CPDF_Object* GetObjectAt(size_t index) const;
+ CPDF_Object* GetDirectObjectAt(size_t index);
+ const CPDF_Object* GetDirectObjectAt(size_t index) const;
ByteString GetStringAt(size_t index) const;
WideString GetUnicodeTextAt(size_t index) const;
int GetIntegerAt(size_t index) const;
float GetNumberAt(size_t index) const;
- CPDF_Dictionary* GetDictAt(size_t index) const;
- CPDF_Stream* GetStreamAt(size_t index) const;
- CPDF_Array* GetArrayAt(size_t index) const;
+ CPDF_Dictionary* GetDictAt(size_t index);
+ const CPDF_Dictionary* GetDictAt(size_t index) const;
+ CPDF_Stream* GetStreamAt(size_t index);
+ const CPDF_Stream* GetStreamAt(size_t index) const;
+ CPDF_Array* GetArrayAt(size_t index);
+ const CPDF_Array* GetArrayAt(size_t index) const;
float GetFloatAt(size_t index) const { return GetNumberAt(index); }
CFX_Matrix GetMatrix() const;
CFX_FloatRect GetRect() const;