summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_dictionary.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-16 12:26:06 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-16 12:26:06 -0800
commit8a3aa459fc5284f51bcd7e98e95bf6214f47bb67 (patch)
tree13fb383936d679aded19054f4e7a0387dd52de76 /core/fpdfapi/parser/cpdf_dictionary.cpp
parent14a60c50b10de1d9e4edd3629ea210a816940a75 (diff)
downloadpdfium-8a3aa459fc5284f51bcd7e98e95bf6214f47bb67.tar.xz
Make CPDF_Array take unique_ptrs
BUG= Review-Url: https://codereview.chromium.org/2498223005
Diffstat (limited to 'core/fpdfapi/parser/cpdf_dictionary.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_dictionary.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/fpdfapi/parser/cpdf_dictionary.cpp b/core/fpdfapi/parser/cpdf_dictionary.cpp
index 02cdfa37da..f28507e2e4 100644
--- a/core/fpdfapi/parser/cpdf_dictionary.cpp
+++ b/core/fpdfapi/parser/cpdf_dictionary.cpp
@@ -270,22 +270,22 @@ void CPDF_Dictionary::SetBooleanFor(const CFX_ByteString& key, bool bValue) {
void CPDF_Dictionary::SetRectFor(const CFX_ByteString& key,
const CFX_FloatRect& rect) {
CPDF_Array* pArray = new CPDF_Array;
- pArray->AddNumber(rect.left);
- pArray->AddNumber(rect.bottom);
- pArray->AddNumber(rect.right);
- pArray->AddNumber(rect.top);
+ pArray->AddNew<CPDF_Number>(rect.left);
+ pArray->AddNew<CPDF_Number>(rect.bottom);
+ pArray->AddNew<CPDF_Number>(rect.right);
+ pArray->AddNew<CPDF_Number>(rect.top);
SetFor(key, pArray);
}
void CPDF_Dictionary::SetMatrixFor(const CFX_ByteString& key,
const CFX_Matrix& matrix) {
CPDF_Array* pArray = new CPDF_Array;
- pArray->AddNumber(matrix.a);
- pArray->AddNumber(matrix.b);
- pArray->AddNumber(matrix.c);
- pArray->AddNumber(matrix.d);
- pArray->AddNumber(matrix.e);
- pArray->AddNumber(matrix.f);
+ pArray->AddNew<CPDF_Number>(matrix.a);
+ pArray->AddNew<CPDF_Number>(matrix.b);
+ pArray->AddNew<CPDF_Number>(matrix.c);
+ pArray->AddNew<CPDF_Number>(matrix.d);
+ pArray->AddNew<CPDF_Number>(matrix.e);
+ pArray->AddNew<CPDF_Number>(matrix.f);
SetFor(key, pArray);
}