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

Unified Diff: xfa/src/fee/src/fee/fde_txtedtengine.cpp

Issue 1577503002: Merge to XFA: Switch most min/max macros to std::min/max. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rebase 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 | « xfa/src/fee/src/fee/fde_txtedtbuf.cpp ('k') | xfa/src/fee/src/fee/fde_txtedtpage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fee/src/fee/fde_txtedtengine.cpp
diff --git a/xfa/src/fee/src/fee/fde_txtedtengine.cpp b/xfa/src/fee/src/fee/fde_txtedtengine.cpp
index 51f41d1273b224b4e139c823aca6183caf046ede..7d87f2c0e9a2b8ead5ac5aa969e890802118c198 100644
--- a/xfa/src/fee/src/fee/fde_txtedtengine.cpp
+++ b/xfa/src/fee/src/fee/fde_txtedtengine.cpp
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include <algorithm>
+
#include "xfa/src/foxitlib.h"
#include "xfa/src/fee/include/ifde_txtedtengine.h"
#include "xfa/src/fee/include/ifde_txtedtbuf.h"
@@ -122,7 +124,7 @@ void CFDE_TxtEdtEngine::SetTextByStream(IFX_Stream* pStream) {
uint8_t bom[4];
int32_t nPos = pStream->GetBOM(bom);
pStream->Seek(FX_STREAMSEEK_Begin, nPos);
- int32_t nPlateSize = FX_MIN(nStreamLength, m_pTxtBuf->GetChunkSize());
+ int32_t nPlateSize = std::min(nStreamLength, m_pTxtBuf->GetChunkSize());
FX_WCHAR* lpwstr = FX_Alloc(FX_WCHAR, nPlateSize);
FX_BOOL bEos = false;
while (!bEos) {
@@ -389,7 +391,7 @@ int32_t CFDE_TxtEdtEngine::MoveCaretPos(FDE_TXTEDTMOVECARET eMoveCaret,
break;
}
if (bShift && m_nAnchorPos != -1 && (m_nAnchorPos != m_nCaret)) {
- AddSelRange(FX_MIN(m_nAnchorPos, m_nCaret),
+ AddSelRange(std::min(m_nAnchorPos, m_nCaret),
FXSYS_abs(m_nAnchorPos - m_nCaret));
m_Param.pEventSink->On_SelChanged(this);
}
« no previous file with comments | « xfa/src/fee/src/fee/fde_txtedtbuf.cpp ('k') | xfa/src/fee/src/fee/fde_txtedtpage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698