summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-11 17:33:52 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-11 17:33:52 +0000
commitb372dc6b20fca803aef86583551982fb9178011f (patch)
tree0d5a6724ecaf21ff51d63d1c6c200ebd1b7bc4e8 /core
parent52239566107bda5d0d44395e5f3b6629356c2e23 (diff)
downloadpdfium-b372dc6b20fca803aef86583551982fb9178011f.tar.xz
Remove explicit calls to x->operator[]
Because its a code smell of a sort. Change-Id: Id1c1b124f539e31a929701fb9486da9d396d3563 Reviewed-on: https://pdfium-review.googlesource.com/34695 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/fpdftext/cpdf_textpagefind.cpp2
-rw-r--r--core/fxcodec/gif/cfx_lzwdecompressor_unittest.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdftext/cpdf_textpagefind.cpp b/core/fpdftext/cpdf_textpagefind.cpp
index 52fdb4aa38..62bc3cb87c 100644
--- a/core/fpdftext/cpdf_textpagefind.cpp
+++ b/core/fpdftext/cpdf_textpagefind.cpp
@@ -292,7 +292,7 @@ void CPDF_TextPageFind::ExtractFindWhat(const WideString& findwhat) {
size_t pos = 0;
while (pos < word->GetLength()) {
WideString curStr = word->Mid(pos, 1);
- wchar_t curChar = word->operator[](pos);
+ wchar_t curChar = (*word)[pos];
if (IsIgnoreSpaceCharacter(curChar)) {
if (pos > 0 && curChar == 0x2019) {
pos++;
diff --git a/core/fxcodec/gif/cfx_lzwdecompressor_unittest.cpp b/core/fxcodec/gif/cfx_lzwdecompressor_unittest.cpp
index 551bc1e23e..0a2c359a85 100644
--- a/core/fxcodec/gif/cfx_lzwdecompressor_unittest.cpp
+++ b/core/fxcodec/gif/cfx_lzwdecompressor_unittest.cpp
@@ -33,7 +33,7 @@ TEST(CFX_LZWDecompressor, ExtractData) {
EXPECT_EQ(10u, *(decompressor->DecompressedNextForTest()));
for (size_t i = 0; i < *(decompressor->DecompressedNextForTest()); ++i)
- EXPECT_EQ(i, decompressed->operator[](i));
+ EXPECT_EQ(i, (*decompressed)[i]);
}
// Check that less than decompressed size only gets the expected number
@@ -53,7 +53,7 @@ TEST(CFX_LZWDecompressor, ExtractData) {
EXPECT_EQ(5u, *(decompressor->DecompressedNextForTest()));
for (i = 0; i < *(decompressor->DecompressedNextForTest()); ++i)
- EXPECT_EQ(i, decompressed->operator[](i));
+ EXPECT_EQ(i, (*decompressed)[i]);
}
// Check that greater than decompressed size depletes the decompressor