From 94fb74c3137ab4f9f817f4cfb14e0a68a677422b Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 30 Aug 2016 06:37:54 -0700 Subject: 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 --- core/fpdfapi/fpdf_page/cpdf_textobject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fpdfapi/fpdf_page/cpdf_textobject.cpp') diff --git a/core/fpdfapi/fpdf_page/cpdf_textobject.cpp b/core/fpdfapi/fpdf_page/cpdf_textobject.cpp index bd17dea86e..af6ae06741 100644 --- a/core/fpdfapi/fpdf_page/cpdf_textobject.cpp +++ b/core/fpdfapi/fpdf_page/cpdf_textobject.cpp @@ -133,11 +133,11 @@ CPDF_PageObject::Type CPDF_TextObject::GetType() const { } void CPDF_TextObject::Transform(const CFX_Matrix& matrix) { - m_TextState.GetPrivateCopy(); CFX_Matrix text_matrix; GetTextMatrix(&text_matrix); text_matrix.Concat(matrix); - FX_FLOAT* pTextMatrix = m_TextState.GetMatrix(); + + FX_FLOAT* pTextMatrix = m_TextState.GetMutableMatrix(); pTextMatrix[0] = text_matrix.GetA(); pTextMatrix[1] = text_matrix.GetC(); pTextMatrix[2] = text_matrix.GetB(); -- cgit v1.2.3