diff options
author | tsepez <tsepez@chromium.org> | 2016-08-26 15:17:12 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-26 15:17:13 -0700 |
commit | 987f3ee94c3cb8e4a6113ad05453a2948469386c (patch) | |
tree | fbd1fdc800c2510c89ae043331a799a42c3251af /core/fpdfapi/fpdf_page/cpdf_contentmark.h | |
parent | 83d2351fd64128156c9abfb70266133d58a5e525 (diff) | |
download | pdfium-987f3ee94c3cb8e4a6113ad05453a2948469386c.tar.xz |
Make CFX_CountRef<>::m_pObject private, add accessors, fix const-ness.
Hide the CountedObj class from the rest of the code.
Rename GetModify() to GetPrivateCopy(), since it turns out
there are places where we modify a potentially-shared copy.
Add non-const version of GetObject() to permit these.
Review-Url: https://codereview.chromium.org/2287633002
Diffstat (limited to 'core/fpdfapi/fpdf_page/cpdf_contentmark.h')
-rw-r--r-- | core/fpdfapi/fpdf_page/cpdf_contentmark.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_contentmark.h b/core/fpdfapi/fpdf_page/cpdf_contentmark.h index 680aed4b99..2f8c5cdbc7 100644 --- a/core/fpdfapi/fpdf_page/cpdf_contentmark.h +++ b/core/fpdfapi/fpdf_page/cpdf_contentmark.h @@ -13,12 +13,13 @@ class CPDF_ContentMark : public CFX_CountRef<CPDF_ContentMarkData> { public: - int GetMCID() const { return m_pObject ? m_pObject->GetMCID() : -1; } + int GetMCID() const { + const CPDF_ContentMarkData* pData = GetObject(); + return pData ? pData->GetMCID() : -1; + } - FX_BOOL HasMark(const CFX_ByteStringC& mark) const; - - FX_BOOL LookupMark(const CFX_ByteStringC& mark, - CPDF_Dictionary*& pDict) const; + bool HasMark(const CFX_ByteStringC& mark) const; + bool LookupMark(const CFX_ByteStringC& mark, CPDF_Dictionary*& pDict) const; }; #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_CONTENTMARK_H_ |