summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page/include
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-08-30 06:37:54 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-30 06:37:54 -0700
commit94fb74c3137ab4f9f817f4cfb14e0a68a677422b (patch)
tree40fb2336c3f95d66e96e532c7ceb8f18bc53fce5 /core/fpdfapi/fpdf_page/include
parent35512aa7e4acc3ceb9c6aef5d61eebfb4ae802af (diff)
downloadpdfium-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/include')
-rw-r--r--core/fpdfapi/fpdf_page/include/cpdf_path.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/fpdf_page/include/cpdf_path.h b/core/fpdfapi/fpdf_page/include/cpdf_path.h
index 98de696004..e0ffa8c1dd 100644
--- a/core/fpdfapi/fpdf_page/include/cpdf_path.h
+++ b/core/fpdfapi/fpdf_page/include/cpdf_path.h
@@ -30,14 +30,14 @@ class CPDF_Path : public CFX_CountRef<CFX_PathData> {
GetPrivateCopy()->Transform(pMatrix);
}
void Append(const CPDF_Path& other, const CFX_Matrix* pMatrix) {
- GetObject()->Append(other.GetObject(), pMatrix);
+ GetPrivateCopy()->Append(other.GetObject(), pMatrix);
}
void AppendRect(FX_FLOAT left,
FX_FLOAT bottom,
FX_FLOAT right,
FX_FLOAT top) {
- GetObject()->AppendRect(left, bottom, right, top);
+ GetPrivateCopy()->AppendRect(left, bottom, right, top);
}
};