From d12a4f465a0bcc8b233079ccd54bf7882f3532d5 Mon Sep 17 00:00:00 2001 From: Bruce Dawson Date: Tue, 6 Jan 2015 13:12:09 -0800 Subject: Resolve all but two VC++ build warnings in pdfium. pdfium builds on Win32 have about 85 warnings (250 in the XFA branch, totaling over 480 lines!), mostly from four lines in a header file and a warning that should be disabled. This change resolves all but two of them and turns on warning-as-errors. Bugs have been filed for the two remaining warnings: https://code.google.com/p/pdfium/issues/detail?id=100 the 64-bit warnings: https://code.google.com/p/pdfium/issues/detail?id=101 and the Linux warnings: https://code.google.com/p/pdfium/issues/detail?id=102 The fix to the double->float truncation bugs will also improve code-generation. R=bo_xu@foxitsoftware.com, scottmg@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/792953005 --- core/src/fpdftext/fpdf_text_int.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/src') diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp index c9cfbdda2d..70178a54b0 100644 --- a/core/src/fpdftext/fpdf_text_int.cpp +++ b/core/src/fpdftext/fpdf_text_int.cpp @@ -37,13 +37,13 @@ FX_BOOL _IsIgnoreSpaceCharacter(FX_WCHAR curChar) FX_FLOAT _NormalizeThreshold(FX_FLOAT threshold) { if (threshold < 300) { - return threshold / 2.0; + return threshold / 2.0f; } else if (threshold < 500) { - return threshold / 4.0; + return threshold / 4.0f; } else if (threshold < 700) { - return threshold / 5.0; + return threshold / 5.0f; } - return threshold / 6.0; + return threshold / 6.0f; } FX_FLOAT _CalculateBaseSpace(const CPDF_TextObject* pTextObj, -- cgit v1.2.3