summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-27 18:45:56 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-27 18:45:56 +0000
commit3071871519db375e22950fad02b87aed43963efc (patch)
treece80c287e622877d19aa06e75798a57223b22037 /core/fpdfapi/render
parent2d3655a22edbabd8539578f69b9c6ea9691413ab (diff)
downloadpdfium-3071871519db375e22950fad02b87aed43963efc.tar.xz
Remove CollectionSize from CPDF_RenderStatus
Bug: pdfium:774 Change-Id: I4996f5526884c33d92df964045bd5467c392df5e Reviewed-on: https://pdfium-review.googlesource.com/19490 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index e70e813cb4..b7b37edc4b 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -59,7 +59,6 @@
#include "third_party/base/logging.h"
#include "third_party/base/numerics/safe_math.h"
#include "third_party/base/ptr_util.h"
-#include "third_party/base/stl_util.h"
#ifdef _SKIA_SUPPORT_
#include "core/fxge/skia/fx_skia_device.h"
@@ -1851,8 +1850,7 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj,
return false;
CPDF_RefType3Cache refTypeCache(pType3Font);
- for (int iChar = 0;
- iChar < pdfium::CollectionSize<int>(textobj->GetCharCodes()); iChar++) {
+ for (size_t iChar = 0; iChar < textobj->GetCharCodes().size(); ++iChar) {
uint32_t charcode = textobj->GetCharCodes()[iChar];
if (charcode == static_cast<uint32_t>(-1))
continue;
@@ -1862,12 +1860,12 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj,
continue;
CFX_Matrix matrix = char_matrix;
- matrix.e += iChar ? textobj->GetCharPositions()[iChar - 1] : 0;
+ matrix.e += iChar > 0 ? textobj->GetCharPositions()[iChar - 1] : 0;
matrix.Concat(text_matrix);
matrix.Concat(*pObj2Device);
if (!pType3Char->LoadBitmap(m_pContext.Get())) {
if (!glyphs.empty()) {
- for (int i = 0; i < iChar; i++) {
+ for (size_t i = 0; i < iChar; ++i) {
const FXTEXT_GLYPHPOS& glyph = glyphs[i];
if (!glyph.m_pGlyph)
continue;
@@ -1879,6 +1877,7 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj,
}
glyphs.clear();
}
+
std::unique_ptr<CPDF_GraphicStates> pStates =
CloneObjStates(textobj, false);
CPDF_RenderOptions options = m_Options;