diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-09-26 16:24:49 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-27 01:04:13 +0000 |
commit | 698aed79d6ad6e8e3a0c7a500c108d69f944b82d (patch) | |
tree | fbf7e66e0a2ec096561cd0ba5d3c4d577cd64667 /core/fxcrt/cfx_datetime.cpp | |
parent | 3070e94f608f36e7312fad2d471e3d7546f82ca2 (diff) | |
download | pdfium-698aed79d6ad6e8e3a0c7a500c108d69f944b82d.tar.xz |
Cleanup FX macros
This CL renames the FX_OS defines to have _OS_ in their names and drops
the _DESKTOP suffix. The FXM defines have been changed to just FX.
Change-Id: Iab172fba541713b5f6d14fb8098baf68e3364c74
Reviewed-on: https://pdfium-review.googlesource.com/14833
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_datetime.cpp')
-rw-r--r-- | core/fxcrt/cfx_datetime.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fxcrt/cfx_datetime.cpp b/core/fxcrt/cfx_datetime.cpp index beba3654a4..521e07cb67 100644 --- a/core/fxcrt/cfx_datetime.cpp +++ b/core/fxcrt/cfx_datetime.cpp @@ -7,8 +7,8 @@ #include "core/fxcrt/cfx_datetime.h" #include "core/fxcrt/fx_system.h" -#if _FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_ANDROID_ || \ - _FX_OS_ == _FX_MACOSX_ +#if _FX_OS_ == _FX_OS_LINUX_ || _FX_OS_ == _FX_OS_ANDROID_ || \ + _FX_OS_ == _FX_OS_MACOSX_ #include <sys/time.h> #include <time.h> #endif @@ -92,9 +92,9 @@ bool FX_IsLeapYear(int32_t iYear) { void CFX_DateTime::Now() { FXUT_SYSTEMTIME utLocal; -#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ +#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_ ::GetLocalTime((LPSYSTEMTIME)&utLocal); -#else // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ +#else // _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_ timeval curTime; gettimeofday(&curTime, nullptr); @@ -108,7 +108,7 @@ void CFX_DateTime::Now() { utLocal.wMinute = st.tm_min; utLocal.wSecond = st.tm_sec; utLocal.wMillisecond = curTime.tv_usec / 1000; -#endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ +#endif // _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_ year_ = utLocal.wYear; month_ = static_cast<uint8_t>(utLocal.wMonth); |