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

Unified Diff: xfa/src/fxbarcode/common/BC_CommonByteArray.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/BC_TwoDimWriter.cpp ('k') | xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fxbarcode/common/BC_CommonByteArray.cpp
diff --git a/xfa/src/fxbarcode/common/BC_CommonByteArray.cpp b/xfa/src/fxbarcode/common/BC_CommonByteArray.cpp
index 967a1849d562950cbd4372790feb6434449d6569..c36ff34a6d9900468153a5ef6ffb1c77923b514b 100644
--- a/xfa/src/fxbarcode/common/BC_CommonByteArray.cpp
+++ b/xfa/src/fxbarcode/common/BC_CommonByteArray.cpp
@@ -20,6 +20,8 @@
* limitations under the License.
*/
+#include <algorithm>
+
#include "xfa/src/fxbarcode/barcode.h"
#include "BC_CommonByteArray.h"
CBC_CommonByteArray::CBC_CommonByteArray() {
@@ -61,7 +63,7 @@ FX_BOOL CBC_CommonByteArray::IsEmpty() {
}
void CBC_CommonByteArray::AppendByte(int32_t value) {
if (m_size == 0 || m_index >= m_size) {
- int32_t newSize = FX_MAX(32, m_size << 1);
+ int32_t newSize = std::max(32, m_size << 1);
Reserve(newSize);
}
m_bytes[m_index] = (uint8_t)value;
« no previous file with comments | « xfa/src/fxbarcode/BC_TwoDimWriter.cpp ('k') | xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698