summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-12 15:51:59 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-12 15:51:59 -0800
commit45fe3c2eefd57b48d7307f9efe13d8019c96e489 (patch)
tree65171335463ed9947d434454d0e70aae59dd9bb4 /core/src/fxcodec/codec
parent5a5f1f1c905f2c352d2fbde143456124dd2c0fbf (diff)
downloadpdfium-45fe3c2eefd57b48d7307f9efe13d8019c96e489.tar.xz
Remove the FX_MIN macro.
Bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min, bin the min. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1693913003 .
Diffstat (limited to 'core/src/fxcodec/codec')
-rw-r--r--core/src/fxcodec/codec/fx_codec_flate.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_flate.cpp b/core/src/fxcodec/codec/fx_codec_flate.cpp
index 17f20da1de..ce7c9ade03 100644
--- a/core/src/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/src/fxcodec/codec/fx_codec_flate.cpp
@@ -6,6 +6,7 @@
#include "codec_int.h"
+#include <algorithm>
#include <memory>
#include "core/include/fxcodec/fx_codec.h"
@@ -565,7 +566,8 @@ void TIFF_PredictLine(uint8_t* dest_buf,
int Colors,
int Columns) {
if (BitsPerComponent == 1) {
- int row_bits = FX_MIN(BitsPerComponent * Colors * Columns, row_size * 8);
+ int row_bits = std::min(BitsPerComponent * Colors * Columns,
+ pdfium::base::checked_cast<int>(row_size * 8));
int index_pre = 0;
int col_pre = 0;
for (int i = 1; i < row_bits; i++) {