summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fxedit
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-01-08 15:31:47 -0800
committerLei Zhang <thestig@chromium.org>2016-01-08 15:31:47 -0800
commit9adfbb0920a258e916003b1ee9515e97879db82a (patch)
tree69c568cf9857ea028da91cc3a73f15a21a2c4c73 /fpdfsdk/src/fxedit
parente5ae7226fc3ffad3f76995d31a0f6b2254d50656 (diff)
downloadpdfium-9adfbb0920a258e916003b1ee9515e97879db82a.tar.xz
Switch most min/max macros to std::min/max.
Fix lint errors along the way. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1567343002 .
Diffstat (limited to 'fpdfsdk/src/fxedit')
-rw-r--r--fpdfsdk/src/fxedit/fxet_edit.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp
index c7abbf44bb..0e66b0e3b5 100644
--- a/fpdfsdk/src/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/src/fxedit/fxet_edit.cpp
@@ -6,6 +6,8 @@
#include "fpdfsdk/include/fxedit/fxet_edit.h"
+#include <algorithm>
+
#include "core/include/fpdfapi/fpdf_resource.h"
#define FX_EDIT_UNDO_MAXITEM 10000
@@ -176,8 +178,7 @@ void CFX_Edit_Refresh::Analyse(int32_t nAlignment) {
CPDF_Rect rcResult;
FX_FLOAT fWidthDiff;
- int32_t szMax =
- FX_EDIT_MAX(m_OldLineRects.GetSize(), m_NewLineRects.GetSize());
+ int32_t szMax = std::max(m_OldLineRects.GetSize(), m_NewLineRects.GetSize());
int32_t i = 0;
while (i < szMax) {
@@ -1726,7 +1727,7 @@ void CFX_Edit::SetContentChanged() {
void CFX_Edit::SelectAll() {
if (m_pVT->IsValid()) {
- m_SelState = GetWholeWordRange();
+ m_SelState = CFX_Edit_Select(GetWholeWordRange());
SetCaret(m_SelState.EndPos);
ScrollToCaret();