Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: fpdfsdk/src/fxedit/fxet_edit.cpp

Issue 1567343002: Switch most min/max macros to std::min/max. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: actually compile Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fsdk_baseannot.cpp ('k') | fpdfsdk/src/javascript/PublicMethods.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fxedit/fxet_edit.cpp
diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp
index c7abbf44bb10e4f62e8a32edd2f95432be78ff22..0e66b0e3b57a8424484f28c2e63c361e8c5e5c1a 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();
« no previous file with comments | « fpdfsdk/src/fsdk_baseannot.cpp ('k') | fpdfsdk/src/javascript/PublicMethods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698