Chromium Code Reviews| Index: fpdfsdk/src/fpdf_flatten.cpp |
| diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp |
| index 76ffec3e26edfbbabb94a8a5c300cad4df18aa35..5c30b662c4b69512aa510e02b53daa15ab986f3a 100644 |
| --- a/fpdfsdk/src/fpdf_flatten.cpp |
| +++ b/fpdfsdk/src/fpdf_flatten.cpp |
| @@ -6,6 +6,8 @@ |
| #include "public/fpdf_flatten.h" |
| +#include <algorithm> |
| + |
| #include "fpdfsdk/include/fsdk_define.h" |
| typedef CFX_ArrayTemplate<CPDF_Dictionary*> CPDF_ObjectArray; |
| @@ -300,8 +302,8 @@ void GetOffset(FX_FLOAT& fa, |
| FX_FLOAT x4 = matrix.a * rcStream.right + matrix.c * rcStream.top + matrix.e; |
| FX_FLOAT y4 = matrix.b * rcStream.right + matrix.d * rcStream.top + matrix.f; |
| - FX_FLOAT left = FX_MIN(FX_MIN(x1, x2), FX_MIN(x3, x4)); |
| - FX_FLOAT bottom = FX_MIN(FX_MIN(y1, y2), FX_MIN(y3, y4)); |
| + FX_FLOAT left = std::min(std::min(x1, x2), std::min(x3, x4)); |
|
Tom Sepez
2016/01/08 17:54:43
nit: I guess std::min({x1, x2, x3, x4}) is still b
Lei Zhang
2016/01/08 23:29:53
Don't see it on the allowed list.
|
| + FX_FLOAT bottom = std::min(std::min(y1, y2), std::min(y3, y4)); |
| fa = (rcAnnot.right - rcAnnot.left) / fStreamWidth; |
| fd = (rcAnnot.top - rcAnnot.bottom) / fStreamHeight; |