summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-03-10 14:37:14 -0800
committerChromium commit bot <commit-bot@chromium.org>2017-03-13 19:28:30 +0000
commit375c2764b56b38cc9326a8f8ef668fbf78234e9a (patch)
treeee1056ac37b855135c8c5a544d4716c3d1a9c7b1 /core/fpdfapi/parser
parent723987910fb195e454aab28e1088df4f9ccf0d6e (diff)
downloadpdfium-375c2764b56b38cc9326a8f8ef668fbf78234e9a.tar.xz
Make most PDFium code pass Clang plugin's auto raw check.
Change-Id: I9dc32342e24361389841ecba83081a97fc043377 Reviewed-on: https://pdfium-review.googlesource.com/2959 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/cpdf_array_unittest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fpdfapi/parser/cpdf_array_unittest.cpp b/core/fpdfapi/parser/cpdf_array_unittest.cpp
index 46777289b5..6d458d83cd 100644
--- a/core/fpdfapi/parser/cpdf_array_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_array_unittest.cpp
@@ -133,9 +133,9 @@ TEST(cpdf_array, Clone) {
EXPECT_NE(arr_elem, arr1_elem);
EXPECT_NE(arr_elem, arr2_elem);
for (size_t j = 0; j < kNumOfRowElems; ++j) {
- auto elem_obj = arr_elem->GetObjectAt(j);
- auto elem_obj1 = arr1_elem->GetObjectAt(j);
- auto elem_obj2 = arr2_elem->GetObjectAt(j);
+ auto* elem_obj = arr_elem->GetObjectAt(j);
+ auto* elem_obj1 = arr1_elem->GetObjectAt(j);
+ auto* elem_obj2 = arr2_elem->GetObjectAt(j);
// Results from not deferencing reference objects.
EXPECT_NE(elem_obj, elem_obj1);
EXPECT_TRUE(elem_obj1->IsReference());
@@ -154,7 +154,7 @@ TEST(cpdf_array, Clone) {
for (size_t i = 0; i < kNumOfRows; ++i) {
for (size_t j = 0; j < kNumOfRowElems; ++j) {
// Results from not deferencing reference objects.
- auto elem_obj1 = arr1->GetObjectAt(i)->AsArray()->GetObjectAt(j);
+ auto* elem_obj1 = arr1->GetObjectAt(i)->AsArray()->GetObjectAt(j);
EXPECT_TRUE(elem_obj1->IsReference());
EXPECT_EQ(elems[i][j], elem_obj1->GetInteger());
// Results from deferencing reference objects.
@@ -166,8 +166,8 @@ TEST(cpdf_array, Clone) {
}
TEST(cpdf_array, Iterator) {
- int elems[] = {-23, -11, 3, 455, 2345877,
- 0, 7895330, -12564334, 10000, -100000};
+ const int elems[] = {-23, -11, 3, 455, 2345877,
+ 0, 7895330, -12564334, 10000, -100000};
std::unique_ptr<CPDF_Array> arr(new CPDF_Array);
for (size_t i = 0; i < FX_ArraySize(elems); ++i)
arr->InsertNewAt<CPDF_Number>(i, elems[i]);