diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-04-25 10:29:58 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-25 17:44:29 +0000 |
commit | 6302288dec6111120749754ba8ec2d249b63404b (patch) | |
tree | ea760932b163690fe5274716735b5c5d538615b2 /core/fxcrt/fx_system.cpp | |
parent | d1e01de5f0776700cd52f06569f4fc0bd34e74d6 (diff) | |
download | pdfium-6302288dec6111120749754ba8ec2d249b63404b.tar.xz |
Rename core/fxcrt/fx_basic_coords.cpp to fx_coordinates.cpp
Its contents are delcared in fx_coordinates.h
Remove unused GetIntersection().
Move FXSYS_round to fx_system.cpp.
Change-Id: I70749581d1321dd919e35fa2daab9591098f68e9
Reviewed-on: https://pdfium-review.googlesource.com/4479
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_system.cpp')
-rw-r--r-- | core/fxcrt/fx_system.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/fxcrt/fx_system.cpp b/core/fxcrt/fx_system.cpp index d2b04f502a..cf1c7e5920 100644 --- a/core/fxcrt/fx_system.cpp +++ b/core/fxcrt/fx_system.cpp @@ -6,6 +6,16 @@ #include "core/fxcrt/fx_system.h" +#include <limits> + +extern "C" int FXSYS_round(float d) { + if (d < static_cast<float>(std::numeric_limits<int>::min())) + return std::numeric_limits<int>::min(); + if (d > static_cast<float>(std::numeric_limits<int>::max())) + return std::numeric_limits<int>::max(); + return static_cast<int>(round(d)); +} + #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ size_t FXSYS_wcsftime(wchar_t* strDest, |