summaryrefslogtreecommitdiff
path: root/xfa/fwl/basewidget/fwl_editimp.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-05-19 18:35:02 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-19 18:35:02 -0700
commit8b45eb1443e5a31f6f172fa16169b9b56177b639 (patch)
tree769503082ba93cb1dc0be35f2c6f1a200fea9d3d /xfa/fwl/basewidget/fwl_editimp.cpp
parent6c93df843774354fb7c34cb887583b5312c04415 (diff)
downloadpdfium-8b45eb1443e5a31f6f172fa16169b9b56177b639.tar.xz
Work around sign compare error from commit be9b894.
Review-Url: https://codereview.chromium.org/1989203007
Diffstat (limited to 'xfa/fwl/basewidget/fwl_editimp.cpp')
-rw-r--r--xfa/fwl/basewidget/fwl_editimp.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp
index b734ec6e77..423d0b5c28 100644
--- a/xfa/fwl/basewidget/fwl_editimp.cpp
+++ b/xfa/fwl/basewidget/fwl_editimp.cpp
@@ -10,6 +10,7 @@
#include <memory>
#include <vector>
+#include "third_party/base/stl_util.h"
#include "xfa/fde/cfde_txtedtengine.h"
#include "xfa/fde/fde_gedevice.h"
#include "xfa/fde/fde_render.h"
@@ -779,7 +780,7 @@ FX_BOOL CFWL_EditImp::CanUndo() {
}
FX_BOOL CFWL_EditImp::CanRedo() {
- return m_iCurRecord < m_DoRecords.size() - 1;
+ return m_iCurRecord < pdfium::CollectionSize<int32_t>(m_DoRecords) - 1;
}
FWL_Error CFWL_EditImp::SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant) {
@@ -1462,7 +1463,7 @@ FX_BOOL CFWL_EditImp::IsContentHeightOverflow() {
return pPage->GetContentsBox().height > m_rtEngine.height + 1.0f;
}
int32_t CFWL_EditImp::AddDoRecord(IFDE_TxtEdtDoRecord* pRecord) {
- int32_t nCount = m_DoRecords.size();
+ int32_t nCount = pdfium::CollectionSize<int32_t>(m_DoRecords);
if (m_iCurRecord == nCount - 1) {
if (nCount == m_iMaxRecord) {
m_DoRecords.pop_front();
@@ -1474,7 +1475,7 @@ int32_t CFWL_EditImp::AddDoRecord(IFDE_TxtEdtDoRecord* pRecord) {
}
m_DoRecords.push_back(std::unique_ptr<IFDE_TxtEdtDoRecord>(pRecord));
- m_iCurRecord = m_DoRecords.size() - 1;
+ m_iCurRecord = pdfium::CollectionSize<int32_t>(m_DoRecords) - 1;
return m_iCurRecord;
}
void CFWL_EditImp::Layout() {