summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/JS_Value.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-08-03 13:34:08 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-08-04 16:42:35 +0000
commita2da7c5612f1fa26dde508da2a527a4bab381de0 (patch)
tree84e7343808b5818305e91e4b2bf80d7764dcddef /fpdfsdk/javascript/JS_Value.cpp
parent1952d17428ba5d509dc21cd8d49abba1bd2d2c5d (diff)
downloadpdfium-a2da7c5612f1fa26dde508da2a527a4bab381de0.tar.xz
Enforce recent VC++ version (2015 or later).
Remove ifdef'd code for versions we know will no longer work. Change-Id: I036c80168f846df1b98e9df4972f84655e8418fb Reviewed-on: https://pdfium-review.googlesource.com/10051 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/JS_Value.cpp')
-rw-r--r--fpdfsdk/javascript/JS_Value.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/fpdfsdk/javascript/JS_Value.cpp b/fpdfsdk/javascript/JS_Value.cpp
index 1b8f7f16aa..184ff82fa1 100644
--- a/fpdfsdk/javascript/JS_Value.cpp
+++ b/fpdfsdk/javascript/JS_Value.cpp
@@ -37,10 +37,9 @@ double GetLocalTZA() {
time_t t = 0;
time(&t);
localtime(&t);
-#if _MSC_VER >= 1900
- // In gcc and in Visual Studio prior to VS 2015 'timezone' is a global
- // variable declared in time.h. That variable was deprecated and in VS 2015
- // is removed, with _get_timezone replacing it.
+#if defined(_MSC_VER)
+ // In gcc 'timezone' is a global variable declared in time.h. In VC++, that
+ // variable was removed in VC++ 2015, with _get_timezone replacing it.
long timezone = 0;
_get_timezone(&timezone);
#endif
@@ -68,7 +67,7 @@ double Mod(double x, double y) {
}
int IsFinite(double v) {
-#if _MSC_VER
+#if defined(_MSC_VER)
return ::_finite(v);
#else
return std::fabs(v) < std::numeric_limits<double>::max();