diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-09 23:15:12 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-09 23:15:12 +0000 |
commit | 3774c7a452886b9c8beeb5fa1b54a34611551180 (patch) | |
tree | aba96eeb7d9fc266ecbe7bc460dcaac869514ecf /core/fpdfapi/page/cpdf_iccprofile.h | |
parent | 7e28208d26764438bef62e051d2e1fed13e1e0ec (diff) | |
download | pdfium-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/page/cpdf_iccprofile.h')
-rw-r--r-- | core/fpdfapi/page/cpdf_iccprofile.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/fpdfapi/page/cpdf_iccprofile.h b/core/fpdfapi/page/cpdf_iccprofile.h index 1bc498aa1f..a5c9f6dbfe 100644 --- a/core/fpdfapi/page/cpdf_iccprofile.h +++ b/core/fpdfapi/page/cpdf_iccprofile.h @@ -20,7 +20,7 @@ class CPDF_IccProfile : public Retainable { template <typename T, typename... Args> friend RetainPtr<T> pdfium::MakeRetain(Args&&... args); - CPDF_Stream* GetStream() const { return m_pStream.Get(); } + const CPDF_Stream* GetStream() const { return m_pStream.Get(); } bool IsValid() const { return IsSRGB() || IsSupported(); } bool IsSRGB() const { return m_bsRGB; } bool IsSupported() const { return !!m_Transform; } @@ -28,11 +28,13 @@ class CPDF_IccProfile : public Retainable { uint32_t GetComponents() const { return m_nSrcComponents; } private: - CPDF_IccProfile(CPDF_Stream* pStream, const uint8_t* pData, uint32_t dwSize); + CPDF_IccProfile(const CPDF_Stream* pStream, + const uint8_t* pData, + uint32_t dwSize); ~CPDF_IccProfile() override; const bool m_bsRGB; - UnownedPtr<CPDF_Stream> const m_pStream; + UnownedPtr<const CPDF_Stream> const m_pStream; std::unique_ptr<CLcmsCmm> m_Transform; uint32_t m_nSrcComponents = 0; }; |