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

Unified Diff: xfa/src/fxbarcode/oned/BC_OneDimWriter.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/fxbarcode/oned/BC_OneDReader.cpp ('k') | xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
index 8f4b226e8c13c4d5811aca71d734037ea62a0443..159f27f826cdd06df2c02b41a1cdc24309fed39d 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -22,6 +22,7 @@
#include "BC_OneDimWriter.h"
+#include <algorithm>
#include <memory>
#include "xfa/src/fxbarcode/BC_Writer.h"
@@ -391,7 +392,8 @@ void CBC_OneDimWriter::RenderResult(const CFX_WideStringC& contents,
m_outputHScale = (FX_FLOAT)m_Width / (FX_FLOAT)codeLength;
}
if (!isDevice) {
- m_outputHScale = FX_MAX(m_outputHScale, m_ModuleWidth);
+ m_outputHScale =
+ std::max(m_outputHScale, static_cast<FX_FLOAT>(m_ModuleWidth));
}
FX_FLOAT dataLengthScale = 1.0;
if (m_iDataLenth > 0 && contents.GetLength() != 0) {
@@ -407,7 +409,7 @@ void CBC_OneDimWriter::RenderResult(const CFX_WideStringC& contents,
int32_t outputHeight = 1;
if (!isDevice) {
if (m_Height == 0) {
- outputHeight = FX_MAX(20, m_ModuleHeight);
+ outputHeight = std::max(20, m_ModuleHeight);
} else {
outputHeight = m_Height;
}
« no previous file with comments | « xfa/src/fxbarcode/oned/BC_OneDReader.cpp ('k') | xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698