diff options
author | tsepez <tsepez@chromium.org> | 2016-08-30 06:37:54 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-30 06:37:54 -0700 |
commit | 94fb74c3137ab4f9f817f4cfb14e0a68a677422b (patch) | |
tree | 40fb2336c3f95d66e96e532c7ceb8f18bc53fce5 /core/fpdfapi/fpdf_page/cpdf_textstate.h | |
parent | 35512aa7e4acc3ceb9c6aef5d61eebfb4ae802af (diff) | |
download | pdfium-94fb74c3137ab4f9f817f4cfb14e0a68a677422b.tar.xz |
More better const-ness in CFX_CountRef<>
There are a couple of places where code is calling GetObject()
that should be calling GetPrivateCopy(), but works because the
value may not be shared at the time. This just makes it safer.
Review-Url: https://codereview.chromium.org/2290863002
Diffstat (limited to 'core/fpdfapi/fpdf_page/cpdf_textstate.h')
-rw-r--r-- | core/fpdfapi/fpdf_page/cpdf_textstate.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_textstate.h b/core/fpdfapi/fpdf_page/cpdf_textstate.h index 59c988de06..235bdf1aa1 100644 --- a/core/fpdfapi/fpdf_page/cpdf_textstate.h +++ b/core/fpdfapi/fpdf_page/cpdf_textstate.h @@ -18,8 +18,8 @@ class CPDF_TextState : public CFX_CountRef<CPDF_TextStateData> { void SetFont(CPDF_Font* pFont); FX_FLOAT GetFontSize() const { return GetObject()->m_FontSize; } - FX_FLOAT* GetMatrix() { return GetObject()->m_Matrix; } const FX_FLOAT* GetMatrix() const { return GetObject()->m_Matrix; } + FX_FLOAT* GetMutableMatrix() { return GetPrivateCopy()->m_Matrix; } FX_FLOAT GetFontSizeV() const; FX_FLOAT GetFontSizeH() const; |